home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / comm / servu20c.zip / SERV-U.TXT < prev    next >
Text File  |  1996-08-10  |  140KB  |  2,921 lines

  1.                               
  2.                               
  3.                               
  4.                          FTP Serv-U
  5.                               
  6.                               
  7.                 FTP-Server Daemon for WinSock
  8.                               
  9.                               
  10.                          Version 2.0
  11.                               
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                          ************
  20.        The Serv-U Web site: All you ever wanted to know
  21.           about Serv-U and always the latest version
  22.                               
  23.                    HTTP://www.cat-soft.com
  24.                          ************
  25.  
  26.  
  27.  
  28.  
  29.                          Revision 3
  30.                          August 1996                              
  31.                   ⌐ 1995, 1996 Rob Beckers
  32.                           Cat Soft
  33.                               
  34.  
  35.                          Disclaimer
  36.                          ==========
  37.                               
  38. I  know, itÆs not the nicest way to start off. So letÆs  just
  39. get this part over with, OK?!
  40.  
  41. The  FTP  server  program Serv-U and  its  documentation  are
  42. copyright Rob Beckers. It is distributed as shareware, giving
  43. you  the  right  to try it for a period of 30  days.  If  you
  44. intend  to  use Serv-U after the initial try-out period,  you
  45. are obliged to pay the registration fee.
  46.  
  47. The next paragraph is a beautiful piece of prose. In just two
  48. sentences it says it all. Alas, with all the sue-happy people
  49. in  this world it is unfortunately necessary, so please  bear
  50. with me.
  51.  
  52. This software is provided by the regents and contributors æas
  53. isÆ and any express or implied warranties, including, but not
  54. limited  to,  the  implied warranties of merchantability  and
  55. fitness for a particular purpose are disclaimed.  In no event
  56. shall  the regents or contributors be liable for any  direct,
  57. indirect,  incidental, special, exemplary,  or  consequential
  58. damages  (including,  but  not  limited  to,  procurement  of
  59. substitute goods or services; loss of use, data, or  profits;
  60. or business interruption) however caused and on any theory of
  61. liability,  whether  in contract, strict liability,  or  tort
  62. (including negligence or otherwise) arising in any way out of
  63. the  use of this software, even if advised of the possibility
  64. of such damage.
  65. Contents
  66.  
  67.  
  68. Introduction                                           
  69.  
  70. 1. Making It Work - Installation                        
  71.   1.1 Installation                                     
  72.   1.2 Network  Installation                           
  73.   1.3 Quick Setup                                       
  74.   1.4 De-installation                                   
  75.   1.5 Upgrading                                      
  76.   1.6 Known Bugs & Problems                             
  77.   1.7 A Word to the Wise (but paranoid)                
  78.  
  79. 2. Using Serv-U - How To . . .                      
  80.   2.1 How to Setup Your Server                     
  81.   2.2 How to Add a User                            
  82.   2.3 How to Change a User                         
  83.   2.4 How to Use Access Rules                      
  84.   2.5 How to Setup Anonymous Access                 
  85.   2.6 How to Use Groups                            
  86.   2.7 How to See Who is Logged In                   
  87.   2.8 How to Kick a User Off the Server              
  88.   2.9 How to Setup Logging                         
  89.   2.10 How to Use Sign-on and/or Sign-off Messages       
  90.   2.11 How to Setup User Specific Login Messages      
  91.   2.12 How to Use Directory Change Messages          
  92.   2.13 How to Use Links α la UNIX                   
  93.   2.14 How to Limit Access by IP Number              
  94.   2.15 How to Print via FTP                          
  95.   2.16 How to Execute Programs via FTP with Serv-U    
  96.   2.17 How to Use Serv-U with æSLIP/PPP EmulatorsÆ      
  97.   2.18 How to use Netscape to access Serv-U            
  98.   2.19 How  to  Let  the Whole World into Your  Server  (and
  99.        Delete All Your Files)                               
  100.   2.20 How to use multi-homed IP support                
  101.  
  102. 3. The Inner Workings                                 
  103.   3.1 Serv-U Internals                                  
  104.   3.2 The SERV-U.INI File                             
  105.   3.3 Using External User Access Verification DLLs       
  106.  
  107. 4. Getting In Touch - Bugs & Registration               
  108.   4.1 Serv-U Mailing List and Conference              
  109.   4.2 Reporting Bugs                                   
  110.   4.3 Registering Serv-U                              
  111.   4.4 Registration in the US                         
  112.   4.5 Registration from Abroad                        
  113.  
  114. Registration Form Serv-U                                
  115.  
  116.  
  117. Introduction
  118. ============
  119.  
  120. Thank you for giving this program a try!
  121.  
  122. With  Serv-U, your PC will be turned into a FTP server.  This
  123. means  that  others  on  the computer network  that  you  are
  124. connected to (Internet for most people) can access your PC to
  125. copy, move, make, and delete files and directories, using the
  126. FTP  protocol  (FTP = File Transfer Protocol). This  protocol
  127. dictates standard ways of communication between computers, so
  128. that  many  different  types  of computers,  using  different
  129. operating systems and file formats, can exchange files.
  130.  
  131. Serv-U  is a æserverÆ program and/or daemon. The term  daemon
  132. comes  from ancient Greek mythology. There, the Daemons  were
  133. half-gods, acting as messengers between the people  on  earth
  134. and  the gods. This FTP server acts, likewise, as a messenger
  135. for file transfer between FTP clients and your computer. Once
  136. started  it  sits in the background waiting for a  client  to
  137. contact  it and after communications are established,  acting
  138. out the clientÆs commands.
  139.  
  140. There  are  FTP  servers  (and clients)  for  many  different
  141. systems. This particular program is meant for PCÆs running MS-
  142. Windows  that  have  a WinSock version 1.1 compatible  TCP/IP
  143. stack installed.
  144.  
  145. Why  use  this  program and not one of  the  many  other  FTP
  146. servers that are available? For this I have to take you  back
  147. in  time  a  little, to about two years ago. I needed  a  FTP
  148. server to make some files available to others and tried out a
  149. number  of  server programs. One simply didnÆt work.  Another
  150. would  work,  but as soon as someone started  transferring  a
  151. file from my PC it would lock up the whole machine until  the
  152. transfer  was  complete. And then there was one  that  worked
  153. fine,  but lacked all but the most basic security. So,  after
  154. endless  frustration I decided to write my own,  figuring  it
  155. couldnÆt be that hard. As usual things got a bit out of hand,
  156. but  after  a  year and 11000 lines of C++ there was  version
  157. 1.0.  The  current  version, v2.0, was made  about  one  year
  158. later, and consists of  over 18000 lines of code. I hope  you
  159. like the result!
  160.  
  161. So what has this FTP server to offer?
  162.      
  163.      ╖ Available  in 16- and 32-bit versions for  Win3.1,
  164.        WFW3.11, Win95, and NT.
  165.      ╖ At  the time of this writing there were over  2500
  166.        registered users of Serv-U, with many of those for multiple
  167.        copies!
  168.      ╖ Access for multiple clients at the same time. Access for
  169.        æAnonymousÆ users. With the possibility to limit the number
  170.        of clients at any given time, so your PC remains workable.
  171.      ╖ Lots of security! On a directory and even file basis.
  172.        Allowing different settings for each user, and by putting
  173.        users into ægroupsÆ permitting easy maintenance for large
  174.        numbers of users. ThereÆs even an option to allow or prohibit
  175.        clients on the basis of their IP-number. Ideal if you want to
  176.        let certain people roam around your computer, but you donÆt
  177.        want the whole world knocking at your door (that is to say:
  178.        they can knock, but they wonÆt get in).
  179.      ╖ Lots of features, like configurable sign-on and sign-off
  180.        messages, per user configurable login messages, directory
  181.        change messages, and UNIX-style ælinksÆ.
  182.      ╖ Serv-U lets you execute programs remotely though your
  183.        FTP client.
  184.      ╖ It allows transfer to or from ports, like PRN:, LPT1:,
  185.        COM1:, and AUX:. This allows you to setup your PC as a print
  186.        server by simply transferring the file to be printed to the
  187.        desired  port! Since the ports are part of the regular
  188.        security system, a user needs permission to transfer to/from
  189.        a port, allowing you to control who can use it.
  190.      ╖ A quite complete implementation of, and very strict
  191.        adherence to the FTP standard (found in documents RFC 959 and
  192.        RFC 1123). Supports the æpassiveÆ command PASV. This is
  193.        needed by WWW browsers and proxy agents (something required
  194.        when there is a æfirewallÆ) for FTP transfer. Another feature
  195.        is that you can let æAnonymousÆ users always see the root
  196.        directory (æ/Æ) as their login directory. This, again, is
  197.        needed by some WWW browsers to make FTP transfers work.
  198.      ╖ Support for the æresumeÆ command and multi-homed IP
  199.        server sites. 
  200.      ╖ Support for external user access verification DLLs.
  201.      ╖ Easy to setup and maintain. Everything is accessible
  202.        through menus, and for automated maintenance the settings are
  203.        stored in an .INI file of simple format.
  204.      ╖ There is lots of logging! You can select how much to log
  205.        and where (to screen and/or file). The logfile is of a
  206.        standard format to make machine reading easy, in case you
  207.        need to do that for accounting purposes.
  208.      ╖ It is fast! The file transfer speed youÆll get will be
  209.        very close to the maximum your TCP/IP stack is capable of
  210.        (well, assuming your FTP client is at least as fast of
  211.        course).
  212.      ╖ Life-time free updates when registered (As long as Serv-
  213.        U exists).
  214.      ╖ Compared to the commercial implementations, Serv-U is
  215.        dirt cheap: less than 0.014 per line of code!
  216.  
  217. If  you didnÆt register this program, then youÆre looking  at
  218. the  try-out  version of Serv-U. When started for  the  first
  219. time, itÆll let you choose between a fully functional program
  220. or  a  somewhat  crippled one. The text during  startup  will
  221. explain  these  options  clearly. If  you  choose  the  fully
  222. functional  version  then there is absolutely  no  difference
  223. with  the  registered version. But (yes, there had  to  be  a
  224. æbutÆ),  after  a little over 30 days it will  stop  working.
  225. Counting  starts the first time you run the program.  I  warn
  226. you beforehand: re-installing it will not help you!
  227.  
  228. Before I forget it: A big æThanksÆ to all the beta testers of
  229. Serv-U.  The list is now so long it is no longer possible  to
  230. mention each one individually, but you guys definitely helped
  231. to  make Serv-U a better product! Any bugs that remain are of
  232. course  my  own fault. Special thanks to Ryan and Kevin,  for
  233. revising  the  manual! And, Alun, just after recovering  from
  234. the  initial  shock of Serv-UÆs appearance, I hope  I  didnÆt
  235. shock  you  again by bringing out a 32-bit version of  Serv-U
  236. (There goes the monopoly). . .
  237.  
  238. OK,  enough  sales  talk.  LetÆs  continue  with  the  actual
  239. documentation. First thing will be how to install  Serv-U  to
  240. get you in business.
  241.  
  242.  
  243. 1. Making It Work - Installation
  244. ================================
  245.  
  246. YouÆre eager to get things going, but a little afraid of what
  247. lies ahead. Never fear, it couldnÆt be simpler. So letÆs  get
  248. started!
  249.  
  250. 1.1 Installation
  251. ----------------
  252.  
  253. Nothing is simpler than installing Serv-U: just unzip  it  in
  254. the directory of your choice and run it. There is no need  to
  255. change your æPATHÆ or put anything in other directories.
  256.  
  257. The Serv-U zip-file comes with the following files:
  258.  
  259.      SERV-U16.EXE    - The 16-bit version of the  FTP-server
  260.                        executable itself
  261.       - and/or -
  262.      SERV-U32.EXE    - The 32-bit version of the  FTP-server
  263.                        executable
  264.      SERV-U.DOC      - The  documentation  in  MS-Word
  265.                        version 6.0 format
  266.      SERV-U.TXT      - The documentation in ASCII format
  267.      README.TXT      - Something you have to read
  268.      REGISTER.TXT    - A registration form in ASCII format
  269.      VERSION.TXT     - A list of changes between the  various
  270.                        versions.
  271.      FILE_ID.DIZ     - Short description file for use by
  272.                        bulletin boards
  273.  
  274. When  Serv-U  is started for the first time, it  creates  the
  275. file:
  276.  
  277.       SERV-U.INI     - File containing all settings  and
  278.                        user information
  279.  
  280. The 16-bit version of Serv-U uses MicrosoftÆs 3D-controls  to
  281. make the dialogboxes look better. If for some reason you  get
  282. flat-looking  dialogboxes it means that the file  CTL3DV2.DLL
  283. is  missing.  This  file should be in your WindowÆs  æsystemÆ
  284. directory.  It  is rare if this file is missing,  since  just
  285. about  anything these days uses it. However, if  you  need  a
  286. copy then drop me a line. The 32-bit version uses Windows  95
  287. style controls. This means things will look flat on NT,  this
  288. is normal. In Win95 you will automagically get the 3D-look.
  289.  
  290. Serv-U offers two very distinct ways to try it out. Each with
  291. its  own  advantages and disadvantages. When started for  the
  292. first time (or in absence of a SERV-U.INI file), it will show
  293. you  a screen explaining the two try-out options and allowing
  294. you  to  choose  one  of them. The first choice  is  a  fully
  295. functional  try-out version exactly equal to the real  thing,
  296. but it will stop working after 30 and some days. It does this
  297. by  contacting  a permission server over the  Internet  every
  298. time Serv-U is started. The permission server keeps track  of
  299. when the program was started for the first time and uses that
  300. information  to  determine if it should  be  allowed  to  run
  301. again,  or not. It then sends this answer back to Serv-U  and
  302. the program will consequently work or stop. To this effect, a
  303. network packet is sent to the permission server containing  a
  304. version code, the IP number of your PC, and a run/norun flag.
  305. It  receives back the same packet with the flag set to run or
  306. stop.  This is all that is communicated between the  systems,
  307. nothing more, nothing less!
  308.  
  309. The  second  choice  is a try-out version  that  is  somewhat
  310. crippled. It will only allow a total of 10 file transfers  (5
  311. PUTs  and  5 GETs), it will show a message saying it  is  not
  312. registered  to anyone who logs into the server, and  finally,
  313. it  will  only stay on-line for one hour. You have to restart
  314. it  again  after that to get another hour. The  advantage  is
  315. that  it  will  not  contact my permission  server  over  the
  316. network.
  317.  
  318. Just to make sure this is clear: Once Serv-U is registered it
  319. will NEVER send anything over the network other than what  is
  320. needed  for  regular  FTP traffic! In short:  The  registered
  321. program will NOT contact my permission server!
  322.  
  323. 1.2 Network  Installation
  324. -------------------------
  325.  
  326. To  find  the  setup information, Serv-U first looks  in  the
  327. program directory (i.e. where SERV-U.EXE is located) for  the
  328. file  SERV-U.INI. If no .INI file is found, the program looks
  329. for  the  existence of an environment variable with the  name
  330. SERV-U. If this variable exists, it should be set to the path
  331. for  SERV-U.INI. The program will then use the .INI file this
  332. path  points  to.  For network use with a  single  executable
  333. shared  between many users that need their own settings  this
  334. is  a  convenient  way to set things up. If this  environment
  335. variable  does  not  exist, the whole DOS  path  is  searched
  336. including  the  Windows directories. If a file SERV-U.INI  is
  337. found somewhere it will be used, this way also allowing for a
  338. single  copy  of  the  executable on a network  server  while
  339. having  individual settings for each user. Finally, if  SERV-
  340. U.INI  was still not found, it will be created in the default
  341. program directory.
  342.  
  343. If  a  SERV-U.INI file is available it does not  have  to  be
  344. writable  per se. The program will work when it is read-only,
  345. but  setup  changes and the current position  of  the  Serv-U
  346. window will not be saved.
  347.  
  348. 1.3 Quick Setup
  349. ---------------
  350.  
  351. When you run Serv-U for the first time there will be no users
  352. and  access  will be restricted.  This section will  describe
  353. the  bare  necessities to allow access. In addition  you  can
  354. also  go  through  the æSetupÆ menu items  and  put  in  your
  355. heartÆs  desires. The next chapter will explain  the  various
  356. options and how to use them. You might want to take a look at
  357. it,  since  the  setup  is simple but not  totally  intuitive
  358. (Sorry for that, I tried hard but . . .).
  359.  
  360. Now, to quickly get Serv-U up & running, just start it. Leave
  361. all  the settings at their defaults, since in most cases that
  362. will be OK. Right!
  363.  
  364. At  this  point you have a functioning server but no  defined
  365. users,  so  no  one can log in. To define users,  go  to  the
  366. æSetup  - UsersÆ section  in the menu and youÆll see a  blank
  367. user  setup  screen. Now IÆll assume you want to  setup  your
  368. server  for  anonymous  access. To make  that  work,  do  the
  369. following:
  370.  
  371.      ╖ At  æUser  nameÆ, type the name we  want  to  add:
  372.        æanonymousÆ
  373.      ╖ At æHome directoryÆ, type the directory where you want
  374.        anonymous  users to be. LetÆs assume we want  them  on
  375.        æd:\anonftpÆ, so enter this (or press æBrowseÆ and choose
  376.        your favorite home directory for anonymous users).
  377.      ╖ Press the æAddÆ button of the æFile/Directory access
  378.        rulesÆ section.
  379.      ╖ Anonymous users need access to their home directory, so
  380.        enter æd:\anonftpÆ in the dialogbox and press æOKÆ.
  381.      ╖ ThatÆs all, just leave the other settings at their
  382.        default values and press æStoreÆ to save your setup.
  383.  
  384. You  now have a user with name æAnonymousÆ that can log  into
  385. the  server.  Of  course, if you want anonymous  users  in  a
  386. different  directory then æd:\anonftpÆ,  then  feel  free  to
  387. change  this. Just make sure that the directory  you  specify
  388. actually exist and that it is part of the access rules.
  389.  
  390. If  the  zip-file you have came with both the 16- and  32-bit
  391. version    of    Serv-U   (SERV-U16.EXE   and    SERV-U32.EXE
  392. respectively), and you only need one of them, then you can of
  393. course delete the other to free up disk space.
  394.  
  395. 1.4 De-installation
  396. -------------------
  397.  
  398. It  is  hard to imagine why, but if for some reason some  day
  399. you  want to get rid of Serv-U then that is just as  easy  as
  400. was  installing it. Just delete the whole directory where you
  401. put  it,  and  thatÆs it! Serv-U does not change  any  system
  402. files and does not place any files in other directories.
  403.  
  404. 1.5 Upgrading
  405. -------------
  406.  
  407. Upgrading from an earlier version of Serv-U is not difficult,
  408. but  there are a few things to keep an eye on. Here  are  the
  409. steps to follow:
  410.  
  411.      ╖ If you are running Serv-U: Exit the program.
  412.      ╖ Make a backup of the old Serv-U files. Just in case. . .
  413.      ╖ Unzip the new Serv-U zip-file in a temporary directory
  414.        and copy the contents over the existing files in your Serv-U
  415.        directory (Watch out that you get the direction of copying
  416.        right!).
  417.      ╖ Go to the Serv-U directory and delete the file BWCC.DLL
  418.        if it exists, version 2 no longer needs this file. Note: Only
  419.        delete BWCC.DLL if it is in the Serv-U directory, do not
  420.        delete the one in the Windows\System directory as other
  421.        programs might use this.
  422.      ╖ If you are using signon or signoff messages with æ%Æ
  423.        directives, then you will have to change those. The old
  424.        directives no longer work. Take a look at the æHow to setup
  425.        sign-on and/or sign-off messagesÆ section for the  new
  426.        directives.
  427.  
  428. Your  old SERV-U.INI file will be used by the new program  so
  429. you donÆt have to re-install any users.
  430.  
  431. The 16-bit version of Serv-U now uses MicrosoftÆs 3D-controls
  432. to create a 3D-look. This is done by a file named CTL3DV2.DLL
  433. which should be in your WINDOWS\SYSTEM directory. Most likely
  434. you  already have this file, and therefore it is not part  of
  435. the  Serv-U zip-file. But if the dialogboxes look  flat  then
  436. drop  me a line and I will make the DLL available. Note  that
  437. this is only meant for the 16-bit version of Serv-U. The  32-
  438. bit  version will always look flat on NT (Until NT adopts the
  439. Win95  look)! On Windows 95 the 32-bit version will  use  the
  440. built-in 3D-controls, and thus have a 3D-look.
  441.  
  442. 1.6 Known Bugs & Problems
  443. -------------------------
  444.  
  445. At  the  time  this documentation is being written  the  only
  446. known  bug  left in the program is the lack of on-line  help.
  447. Everything that was found in earlier versions has been fixed.
  448. If  you  have  any  problems,  please  first  check  out  the
  449. æFrequently  Asked QuestionsÆ on my Web site (HTTP://www.cat-
  450. soft.com).  I will do my best to keep an up-to-date  list  of
  451. everything worthwhile there.
  452.  
  453. Unfortunately  there  are still a number  of  WinSock  socket
  454. stacks that are not 100% compliant with the WinSock standard.
  455. Since  Serv-U uses the stack to its fullest, this can  result
  456. in  a  number  of symptoms. The following has been  observed:
  457. directory listings and file transfers do not work; after  the
  458. first  client  the  server seems blocked; WWW  browsers  seem
  459. unable to work with Serv-U; the PC is blocked when Serv-U  is
  460. transferring a file.
  461.  
  462. Problem WinSock socket stacks
  463. -----------------------------
  464. Below is the current list of socket stacks that are known  to
  465. cause  problems.  If you find any others  with  problems,  or
  466. solutions to the ones mentioned below, please let me know  so
  467. I can pass the word on to others.
  468.  
  469.      ╖ FTP Software Inc's socket stack: Their earlier stacks
  470.        cause problems. Version 2.2 with WINSOCK.DLL v1.15.1 is
  471.        rumored      to      work      OK.      Check      out
  472.        ftp://ftp.ftp.com/support/ftpsoft/winsock for updates. Their
  473.        latest version WINSOCK.DLL can be found in WINSOCK.EXE
  474.        (currently v1.17.1).
  475.      ╖ Spry's Internet-in-a-box stack: Version 2.0 is rumored
  476.        to          work         OK.         Check         out
  477.        http://www.spry.com:80/products/upgradingibox.html for
  478.        updates.
  479.      ╖ The Air socket stack is rumored to come from the same
  480.        factory as SpryÆs. WonÆt work though.
  481.      ╖ Core Systems' Internet-Connect stack does not work with
  482.        Serv-U.
  483.      ╖ DEC's PathWorks stack does not work either.
  484.      ╖ Sun's PC-NFS stack version 5.1A and later works, but
  485.        earlier versions are a problem.
  486.      ╖ Earlier versions of the Microsoft Wolverine stack had a
  487.        tendency to bomb back to DOS when the network got busy. This
  488.        has  been  fixed  in  version  3.11b,  available  from
  489.        ftp://ftp.microsoft.com/bussys/clients/wfw/tcp32b.exe. A
  490.        highly recommended stack!
  491.      ╖ Novell's LanWorkplace stack seems to work for some
  492.        people, but doesn't for others. In any event, you need
  493.        version 4.2T3 or later. The 'T3' patch is available from
  494.        http://netwire.novell.com/servsup/binhtml/1203536.htm.
  495.      ╖ In case you have Netmanage's Chameleon's Sampler you
  496.        need at least version 3.11. Reports are that it works fine on
  497.        version 4.5.1 of Chameleon.
  498.      ╖ PC/TCP's OnNet stack locks up the PC during file
  499.        transfers, but it works fine otherwise.
  500.      ╖ CompuServe's WinSock stack does not work with Serv-U
  501.        (WasnÆt that bought from Spry?!).
  502.      ╖ The  various  versions of Trumpet's WinSock  stack
  503.        generally work fine. But, version 2.0b had a tendency to kill
  504.        the socket Serv-U uses to listen for incoming clients, thus
  505.        making the server unreachable. This has been fixed in version
  506.        2.1f,     so     better    get    that    one     from
  507.        ftp://jazz.trumpet.com.au/pub/winsock/twsk21f.zip.
  508.      ╖ QuarterdeckÆs socket stack does not work with Serv-U.
  509.      ╖ The Windows 95 built-in 16-bit TCP/IP stack usually
  510.        works fine, and is very stable. But, it sometimes kills Serv-
  511.        UÆs listening socket, resulting in æConnection deniedÆ
  512.        messages  from clients. This is a Win95 bug  which  MS
  513.        acknowledges and claims to be the result of programs not
  514.        freeing their sockets before terminating. The latter is
  515.        probably BS, IMHO, but it lets them pass the buck. Most
  516.        people will never see this while others seem to have the
  517.        problem continuously.
  518.  
  519. æSLIP/PPP emulators - TIA, TWinsock, PipelineÆ
  520. ----------------------------------------------
  521. If  you  are  using  a  so called 'SLIP emulator'  like  TIA,
  522. TWinsock,  or Pipeline, there are also a number of things  to
  523. keep   in   mind.  These  emulators  are  not  real  Internet
  524. connections,  and because of the way they have  to  do  their
  525. work they have a number of peculiarities. Since the PC has to
  526. share  the  IP number with the host system you will generally
  527. not  be  able to use the default port 21 for Serv-U. Instead,
  528. you  either  have to use a high port number (generally  above
  529. 8000) or set up 'port redirection'. Ask you Internet provider
  530. for  details about the latter. A related problem is that  the
  531. IP  number  displayed by Serv-U is not  the  IP  number  that
  532. clients  should use to contact your server. It  is  merely  a
  533. dummy  to  keep  the socket stack of the PC  happy.  For  the
  534. outside  world the IP number of your server is  the  same  as
  535. that  of the emulator host system, i.e. that of your Internet
  536. provider. Another special effect is that clients will not  be
  537. able  to  use 'passive' mode for data transfers.  This  means
  538. that  regular FTP clients will work OK, but WWW browsers like
  539. Netscape and Mosaic will not work when Serv-U runs via a SLIP
  540. emulator.  For  the same reason it won't be possible  to  use
  541. clients that are also connected via a SLIP emulator.
  542.  
  543. Dynamic IP
  544. ----------
  545. If  you  use a modem and telephone to connect to the Internet
  546. via a service provider, then chances are that you will get  a
  547. different IP number each time you connect to the network. You
  548. can  see  what  your current IP number is by looking  at  the
  549. startup  messages  of  Serv-U: one of the  lines  is  the  IP
  550. number. Serv-U does not have a problem with dynamic IP.  Just
  551. make  sure  you  start the server after  connecting  to  your
  552. service  provider,  so  Serv-U will  report  the  current  IP
  553. number.  However, if you want to run a steady FTP site,  then
  554. dynamic  IP  is a pain in the lower rear end! You users  will
  555. have  to  know  which IP number to contact and  if  yours  is
  556. changing all the time it does not help. . .
  557.  
  558. Your  IP number is entirely up to your provider and there  is
  559. absolutely nothing Serv-U can do about it! It merely uses the
  560. number  available.  So,  if you want a  fixed  (æstaticÆ)  IP
  561. number  the  only person to talk to is your Internet  service
  562. provider. Sometimes it is possible to get a fixed symbolic IP
  563. name, even though the number varies each time (An IP name  is
  564. something like æwww.cat-soft.comÆ, you can use it instead  of
  565. an IP number). Again, talk to your provider.
  566.    
  567. 1.7 A Word to the Wise (but paranoid)
  568. -------------------------------------
  569.  
  570. Many  a  word has been spent on the alt.winsock newsgroup  on
  571. the  try-out enforcement practice of Serv-U, and in a broader
  572. sense on the security of network programs. If you choose  for
  573. the æfully functional try-out versionÆ then this program will
  574. communicate with a remote system to determine if it should be
  575. allowed to run or not. That is the way the 30 days of try-out
  576. are  enforced.  To  that  effect,  information  is  exchanged
  577. between your PC and mine, and as people asked: How do I  know
  578. that  my  password file is not being sent over? Another,  but
  579. similar  question is: How can I be sure there  are  no  æback
  580. doorsÆ  in the server, allowing access to the author  at  any
  581. time?  The short and hard answer is: You donÆt know  and  you
  582. can never be sure!
  583.  
  584. I  know this is not much of a deal, so IÆll at least give you
  585. one option to establish my good intentions. To anyone who  is
  586. interested,  I  offer to personally go over the  source  code
  587. with you (all 18000+ lines of it) and weÆll compile it on the
  588. spot. You will understand that I am not going to hand out any
  589. source  code. If you want to take it home youÆd better  bring
  590. along a whole lot of $$$Æs!
  591.  
  592. It  is worthwhile to realize that security is a problem  with
  593. any  type  of  network  program. It  is  fairly  easy  for  a
  594. programmer  to put code in, for example, a WWW  browser  that
  595. will  wait  for  5  months, until the  full  moon  and  Venus
  596. coincide, then monitor PC activity and if a user hasnÆt  been
  597. present for a few hours, or if itÆs 4 in the morning,  starts
  598. sending  over  the  whole hard disk to unknown  destinations.
  599. This  kind  of thing is not easy to detect, donÆt let  anyone
  600. tell  you  otherwise, and I still have  to  meet  the  system
  601. manager that keeps a network monitor running 24 hours a  day,
  602. year  after year and actually reads the log files. The bottom
  603. line  is  that you will have to trust the author of a program
  604. at some point, there is no other choice!
  605.  
  606. Now donÆt write to me that conversely I should trust you that
  607. "the check is in the mail and please send me the registration
  608. key in advance". . .
  609.  
  610. That  is all I have to say about installing Serv-U. Now letÆs
  611. look  into how we can use it to get some real work done.  The
  612. next chapter will take you through all its features.
  613.  
  614.  
  615. 2. Using Serv-U - How To . . .
  616. ==============================
  617.  
  618. Rather  than describing every menu and dialogbox to its  last
  619. boring detail, I though it would be more useful to present  a
  620. task-driven approach. This chapter is therefore divided  into
  621. sections that each describe how a specific task can be  done,
  622. in the form of æHow toÆ questions and answers. There is a bit
  623. of overlap between the sections, so you might come across the
  624. same  thing more than once. If you read this manual cover-to-
  625. cover  then you will also have learned about every  menu  and
  626. dialogbox  detail  in  the  process.  Makes  great   bed-time
  627. reading!
  628.  
  629. 2.1 How to Setup Your Server
  630. ----------------------------
  631.  
  632. You  shouldnÆt believe all I say: This first section is going
  633. to  go  over  the æSetup - FTP ServerÆ menu choice  in  every
  634. grueling detail! No, seriously, this dialogbox stands so much
  635. at  the basis of Serv-UÆs operation and the items in there do
  636. not  fit very well in other sections, that it is a good  idea
  637. to  cover it first, and I will only discuss those items  that
  638. are  not  covered by other sections. So, letÆs  pull  up  the
  639. æSetup FTP-ServerÆ dialogbox.
  640.  
  641. The first item is æFTP port numberÆ. This is the (you guessed
  642. it!)  port number that the server will listen on for incoming
  643. FTP  clients.  The default is number 21, but youÆre  free  to
  644. fill in anything you want, provided it does not conflict with
  645. other  network  programs. Of course, the rest  of  the  world
  646. expects  a  FTP server to listen on port 21, but changing  to
  647. another number is one great way of insuring that only you and
  648. some selected friends will know about your server.
  649.  
  650. The  next  item is the æMaximum no. of usersÆ. With this  you
  651. set  the  maximum number of simultaneous users at  any  given
  652. moment.  Setting  it  to 0 will not allow  anyone  to  enter,
  653. leaving  it  blank will allow an unlimited number,  or,  more
  654. precisely, until the PC runs out of network sockets or  other
  655. resources  like memory. If you need your PC for regular  work
  656. as  well as being a FTP server, it is probably wise to set  a
  657. maximum so normal operations will not be slowed down too much
  658. by  clients. Likewise, æMaximum no. of anonymousÆ limits  the
  659. number  of æAnonymousÆ users at any given moment. If æMaximum
  660. no.  of  usersÆ is specified, then this will limit the  total
  661. number of users, both regular and anonymous, even if æMaximum
  662. number of anonymousÆ is set to a larger number.
  663.  
  664. Some people have asked what would be reasonable settings  for
  665. the  maximum number of users that would still keep the system
  666. workable. The answer is: It depends. It depends very much  on
  667. whether these users are local and thus capable of using up  a
  668. large  bandwidth in data transfer, or alternatively, if these
  669. users  are  further  away  on the  Internet  and  cannot  get
  670. transfer  speeds  of  more than about 10 Kbytes  per  second.
  671. Another  concern  is  the socket stack. Some  WinSock  stacks
  672. start  behaving erratically when they have to  service  large
  673. numbers  of  sockets. Most notoriously is or  was  the  first
  674. version of the Microsoft 32-bit æWolverineÆ stack, which  had
  675. the  tendency to kick the system back to MS-DOS  without  any
  676. warning  when  heavily loaded. One way to find out  how  many
  677. users  your system can handle, in case you run Windows 95  or
  678. NT, is to start the system monitor and keep an eye on the CPU
  679. usage percentage. This will give you a pretty good idea  very
  680. fast.  My experience is that even a measly 486 can handle  20
  681. or so concurrent users with easy.
  682.  
  683. This  brings  me  to another topic which is  related  to  the
  684. above:  Server stability is going to depend very much on  the
  685. operating  system you are using. MS-Windows 3.1  and  WFW3.11
  686. are  inherently so unstable that you should not expect Serv-U
  687. to  run for more than a few days at a time before a reboot is
  688. needed. Very much better is Windows 95, especially when  used
  689. with  the  build-in socket stack. Having used  it  since  the
  690. early  betas  it seems to work fine for several  weeks  at  a
  691. time. Definitely recommended for serious server work! At  the
  692. top  of  the  stability  list stands NT.  I  donÆt  have  any
  693. experience with it myself, but people using Serv-U in NT tell
  694. me it is very stable.
  695.  
  696. Another often asked question concerns maximum transfer speeds
  697. that can be obtained with Serv-U: LetÆs just say that even on
  698. a  measly  486 you donÆt have to worry about this unless  you
  699. have  at  least  a T3 network connection, Serv-U  can  easily
  700. saturate  a T1 line (= about 1.5 Mbits per second).  You  can
  701. try  out raw speed by yourself: Just start a FTP client, like
  702. WS_FTP  on  the  same PC as where the server is  running  and
  703. transfer some files through it. This bypasses the network, so
  704. what  you are seeing is Serv-U plus hard disk access and part
  705. of  the  socket stack. The conclusion from this will probably
  706. be  that your biggest performance bottle neck is going to  be
  707. your network connection.
  708.  
  709. LetÆs  get on with the list. To  make sure that users  cannot
  710. log onto your server and keep connections open until eternity
  711. it   is  possible  to  set  æTime-out  usersÆ  and  æTime-out
  712. anonymousÆ. If a connection has been idle for more  than  the
  713. number  of  minutes you specify here it will be automatically
  714. closed.  Filling  in 0 or leaving it blank switches  off  the
  715. time-out.  It  is  a good idea to fill in some  values  here,
  716. since  otherwise the system would slowly fill up with sockets
  717. that  for  some reason got stuck, not to mention  users  that
  718. connect  and  start  a transfer just before  they  leave  the
  719. office in the evening and then go home. Default values are 15
  720. minutes  for anonymous users and 10 hours (=600 minutes)  for
  721. regular users.
  722.  
  723. If  you would like to leave your PC wide open for the rest of
  724. the world you can uncheck the æEnable securityÆ checkbox. But
  725. beware:  DISABLING SECURITY WILL ALLOW ANYBODY ON THE NETWORK
  726. TO  DELETE/CHANGE/COPY  EVERYTHING ON  YOUR  PC!!!  The  only
  727. reason  I  put this option in is to make it easy  for  people
  728. that have their own local network and donÆt want to mess with
  729. users  and  passwords. By default this option is, of  course,
  730. checked.  DO  NOT  EVER  LEAVE THE æEnable  SecurityÆ  OPTION
  731. UNCHECKED IF YOUR PC IS CONNECTED TO THE INTERNET!!!
  732.  
  733. 2.2 How to Add a User
  734. ---------------------
  735.  
  736. One of the most fundamental tasks you are going to have to do
  737. is  adding  new users. Unless you switched off all  security,
  738. you are going to have to deal with this.
  739.  
  740. Upon choosing the æSetup - UsersÆ menu option a dialogbox  is
  741. presented  to you. It contains a list of all known  users  on
  742. the  left and by clicking on one of those users you  can  see
  743. the  settings for that user on the right side.  Now,  if  you
  744. just started this server for the first time there will be  no
  745. names  in the list, short of Divine Intervention. If you  are
  746. at this point and are about to setup your first user, just go
  747. ahead  and  type in the various fields. If there already  are
  748. users defined you will see the settings of the first one  and
  749. to  get  rid  of  this and create an empty sheet  just  press
  750. æNewÆ.  Doing the latter will pop up a little box asking  you
  751. for the new userÆs name, which I think speaks for itself.
  752.  
  753. The  next thing is important, so pay attention: You can  fill
  754. in  or change any name in the æUser nameÆ field. If this  new
  755. name does not exist it will be added to the list of users. If
  756. this  name exists, the settings for this user will be changed
  757. to  the ones in the dialogbox. In short, this is another  way
  758. to add new users. So, if you clicked on user æJamesÆ and then
  759. go  on to set his password to ælightbulbÆ and you change  the
  760. user  name  to something that does not exist yet,  letÆs  say
  761. æTanyaÆ, then you just created a new user Tanya with all  the
  762. settings  of  James  except for his  password.  This  way  of
  763. dealing with users might strike you as somewhat strange.  The
  764. advantage of it is that you can take an existing user and, by
  765. making only the few needed changes, turn it into a new user.
  766.  
  767. Now  letÆs  take a closer look at the various fields  in  the
  768. æSetup  UsersÆ  dialogbox. IÆve dealt with  the  æUser  nameÆ
  769. field,  so this brings us to æGroup nameÆ. Every user can  be
  770. part  of a group. The convenience in making users part  of  a
  771. group is that you can leave common settings for all users  of
  772. a particular group blank and just fill them out in the æSetup
  773. GroupÆ  dialogbox, about which you can find more  information
  774. later  on  in the æHow to use groupsÆ section. This goes  for
  775. all  settings,  including password, home directory  and  path
  776. access  rules.  To overrule a certain group  setting,  simply
  777. provide  one for the user. Only exception for groups  is  the
  778. user  with  special  name æAnonymousÆ.  For  æAnonymousÆ  the
  779. system ignores any group setting you might have. In fact,  if
  780. you  try to enter a group for a user with that name it  wonÆt
  781. even  get  stored and is gone the next time you look  at  the
  782. settings for æAnonymousÆ.
  783.  
  784. We  did  get  ahead  of ourselves in the  discussion  of  the
  785. various fields, so let me back up a bit. The æPasswordÆ field
  786. is  of course for adding a password for a user. The passwords
  787. are stored encrypted using UNIX æcryptÆ. This algorithm works
  788. like a sausage machine: you put in a pig on one side and turn
  789. the crank, out comes the sausage. But, pushing in the sausage
  790. while turning the crank backwards will not get you a pig!  It
  791. is  quite  secure, I wouldnÆt know of a way to get the  plain
  792. text password back (the NSA might though). Once a password is
  793. stored  you  will  only see the word æ<<Encrypted>>Æ  in  the
  794. password field. This is to indicate there is a password.  You
  795. cannot  edit existing passwords, since the original is  truly
  796. lost  and  only the encrypted form is kept. The only  way  to
  797. change it is by typing in a completely new one.
  798.  
  799. If you leave the password field empty this does not mean that
  800. the  user has no password. Serv-U assumes that all users need
  801. a  password and will try if there is a group setting and look
  802. there  for  the  password. If no password can be  found  then
  803. access will be denied to the user. There is a way to setup  a
  804. user without a password, but  it needs direct editing of  the
  805. SERV-U.INI  file. You can find the details in the chapter  on
  806. Serv-U internals.
  807.  
  808. There  is  one  more  exception  with  passwords  that  youÆd
  809. probably already know: The user name æAnonymousÆ never has  a
  810. password. Instead, Serv-U will ask for a E-mail address.
  811.  
  812. The  æHome  directoryÆ field is for the userÆs home directory
  813. (To  kick in an open door). This is the place where he or she
  814. is  put immediately after logging in. Each user needs a  home
  815. directory, without one the server will not permit logging in!
  816. Of course, if a user is part of a group, and this group has a
  817. home  directory you donÆt have to specify one here. You might
  818. want to, if this user needs a different one from the rest  of
  819. the  group.  Home  directories always need to  be  full  path
  820. names, including a drive letter!
  821.  
  822. This  brings us to the æMessage fileÆ field. You  can  put  a
  823. file  name of a text file in there. The contents of this file
  824. will  be  displayed to the user just after logging  in.  More
  825. about this in æHow to setup user specific login messagesÆ. If
  826. you  want  the  user  to be able to actually  use  the  newly
  827. created  account, then the æEnable accountÆ check box  should
  828. be  kept  checked. If you want to disable the account without
  829. removing  the  setup information of a user  you  can  uncheck
  830. this, which will keep the user from logging in.
  831.  
  832. A  large portion of the æSetup UsersÆ dialogbox is devoted to
  833. æaccess   rulesÆ.   These  determine  to  which   files   and
  834. directories a user has access. In general, you will  have  to
  835. make  sure that the user has at least read access to  his  or
  836. her  home directory. The quick-and-dirty way to setup  access
  837. for a user is therefore to press æAddÆ and enter the path  of
  838. the  userÆs home directory. Then check the appropriate access
  839. rights, which in this case should be at least æreadÆ, ælistÆ,
  840. and  æinheritÆ,  and you have a functional account.  Although
  841. their use is pretty straight forward in most cases there  are
  842. still  some  ins and outs to access rules. So please  take  a
  843. look at the section æHow to use access rulesÆ which discusses
  844. them in more detail.
  845.  
  846. Obviously, clicking the æStoreÆ button will store  the  newly
  847. created user settings. But this is not the only way: You  can
  848. also  leave  the setup screen by pressing æOKÆ,  any  unsaved
  849. changes  will  be stored as well. Also, if you  already  have
  850. other  users set up, clicking the mouse on another user  name
  851. will save changes.
  852.  
  853. We  already came across the special user name æAnonymousÆ  to
  854. allow  access  without a password. The  user  name  æFTPÆ  is
  855. understood  by  Serv-U as a synonym for æAnonymousÆ.  When  a
  856. user  enters  æFTPÆ it will be translated to æAnonymousÆ,  so
  857. the  latterÆs settings apply to æFTPÆ. There is one more user
  858. name  with  special meaning to Serv-U: æALLÆ. Now where  does
  859. this  tie in? Well, every action requiring security clearance
  860. (checking a password during login, reading, writing, etc.) is
  861. first  checked against the settings for the particular  user.
  862. If  no  appropriate  setting is found  there,  and  the  user
  863. belongs  to  some group, the group settings are  checked.  If
  864. still  no  corresponding setting is found, the user æALLÆ  is
  865. consulted (if it exists). So æALLÆ works as a blanket for all
  866. users,  providing the most common settings. Of  course,  this
  867. also provides a potentially big security hole, so be careful!
  868.  
  869. This  should  have you started in creating user account.  The
  870. next  section  gives  you  a few details  on  how  to  change
  871. existing user accounts.
  872.  
  873. 2.3 How to Change a User
  874. ------------------------
  875.  
  876. For  the  most  part  the things mentioned  in  the  previous
  877. section,  æHow  to add a userÆ, also apply to  changing  user
  878. settings. However, there are a few peculiarities that deserve
  879. extra attention.
  880.  
  881. First  of  all,  keep in mind that you can  change  a  userÆs
  882. settings  at  all times in the æSetup UsersÆ dialogbox.  This
  883. includes  the userÆs name, but care should be taken in  doing
  884. this,  since there might be side effects: If you  change  the
  885. name  to a non-existent one and store the settings this  will
  886. in  effect  create a new user with that name.  Also,  if  you
  887. change  the  name  to one that already exists  then  you  are
  888. changing  the settings for the user with that name!  To  drag
  889. our  favorite example once more out of the closet: LetÆs  say
  890. you  want  to  change the password of user  æJamesÆ.  So  you
  891. clicked  on  æJamesÆ and then go on to set  his  password  to
  892. ælightbulbÆ and you change the user name to that  of  another
  893. user,  letÆs  say æTanyaÆ. Then Tanya is going to  be  mighty
  894. upset when she tries to enter your FTP server! James will  of
  895. course  have  to  remember  his old password,  since  nothing
  896. changed for him.
  897.  
  898. Another peculiarity that can come in handy is when changes to
  899. user  settings get stored. There are several ways to do this.
  900. Obviously clicking on æStoreÆ will do the trick. Another  way
  901. is to press æOKÆ and leave the user setup. This will save any
  902. changes  too. The third and last way to store changes  is  by
  903. simply  selecting another user from the list on the  left  of
  904. the  æSetup UsersÆ dialogbox. Up until you store changes  you
  905. can  recover  the  original  settings  by  the  pressing  the
  906. æRestoreÆ button. This does not hold for the æDeleteÆ button.
  907. Pressing  this  will erase the selected user  completely  and
  908. there is no way to get it back (IÆm a nice guy, so youÆll get
  909. warned first when attempting this)!
  910.  
  911. If  youÆre  editing an existing user who has a password,  the
  912. word  æ<<Encrypted>>Æ will be shown in  the  password  field.
  913. This  indicates there is a password, as opposed to not having
  914. a  password in which case this can be supplied by  the  group
  915. settings.  There is no way to recover the original  password,
  916. once  entered it is lost! So, there is no possibility to edit
  917. the  existing  password, you can only enter a completely  new
  918. one.  To  do  this, erase the word æ<<Encrypted>>Æ completely
  919. and type in the new password.
  920.  
  921. Something that might be of interest to you if you edit  users
  922. by  directly changing the SERV-U.INI file using your favorite
  923. text editor (for example ænotepadÆ): Any changes you make  to
  924. users  take immediate effect. No restarting of the server  is
  925. needed.  This means that you could keep a local copy of  your
  926. INI  file and use a local version of Serv-U to edit it.  Then
  927. just  use  Serv-U itself for uploading the changed SERV-U.INI
  928. file to the production site and you are all set.
  929.  
  930. That  concludes all you need to know for keeping your  userÆs
  931. settings  up-to-date, but it is time to fill in a  big  blank
  932. that is of the essence to using Serv-U: The access rules.
  933.  
  934. 2.4 How to Use Access Rules
  935. ---------------------------
  936.  
  937. The  æAccess rulesÆ part in the æSetup UsersÆ dialogbox forms
  938. the  corner stone of Serv-UÆs security. This is also the part
  939. that  makes  Serv-U unique: It allows very fine control  over
  940. what   a  user  can or cannot do. It allows  you  to  specify
  941. access per directory and even per file for each user!
  942.  
  943. How  does  all  this work? Take a look at the æFile/Directory
  944. access rulesÆ list in the æSetup UsersÆ dialogbox. This  list
  945. contains a number of paths with access information coupled to
  946. each  path.  Access  to the PC is only allowed  according  to
  947. these paths and their access information. No access path,  no
  948. access! So, there is one path you might always want to be  in
  949. the  list: The userÆs home directory. The check boxes at  the
  950. right of the path list show what kind of access the user  has
  951. to  the path in the list. Again, unless the type of access is
  952. specified in these check boxes the user wonÆt get in.
  953.  
  954. LetÆs  take  a  look at the different type of access  we  can
  955. specify  per  directory or file. There  are  eight  different
  956. types  of access information that can be set, four that apply
  957. to  files,  three for directories, and the  final  one  is  a
  958. special case. To start with file access:
  959.      ╖ æReadÆ  access, allows files to be copied from  the  PC
  960.        using the FTP ægetÆ command.
  961.      ╖ æWriteÆ  access, allows files to be copied  to  the  PC
  962.        using æputÆ, but not changed, deleted, or renamed.
  963.      ╖ æDeleteÆ access, allows the user to change  files,
  964.        rename, or delete them. Having æDeleteÆ access automatically
  965.        includes write access (although it does no harm to specify
  966.        both).
  967.      ╖ æExecuteÆ access, is meant for executing files through
  968.        FTP, i.e. for running DOS and Windows programs remotely.
  969.  
  970. Then there are three items that deal with directories:
  971.      ╖ æListÆ access, allows the user to retrieve a directory
  972.        listing using the FTP ædirÆ command.
  973.      ╖ æMakeÆ access lets the user create new directories at
  974.        this path, i.e. the user can make subdirectories.
  975.      ╖ æRemoveÆ allows the user to delete directories.
  976.  
  977. The final item is somewhat special:
  978.      ╖ æInheritÆ means that the access rule automatically
  979.        applies to all subdirectories of the path, i.e. the rule is
  980.        inherited by subdirectories.
  981.  
  982. Most  of  the above should be no surprise to you,  but  letÆs
  983. take  a  closer look at a few of the less clear items. First,
  984. to  allow  a user to use the FTP command æcdÆ to get  into  a
  985. directory  any of the rights is sufficient. So, a  user  that
  986. has æreadÆ, æwriteÆ, ædeleteÆ, æexecuteÆ, ælistÆ, æmakeÆ,  or
  987. æremoveÆ  can  change to the directory in  the  access  path.
  988. Conversely, if a path is specified without any access  rights
  989. (except  for æInheritÆ) then the user has no access  what-so-
  990. ever to this path.
  991.  
  992. A  user has æwriteÆ access to a file or path, but no ædeleteÆ
  993. access, can upload files to the server as long as they do not
  994. exist  already. This is good for an upload directory, because
  995. it  allows  uploads without the chance of changing previously
  996. uploaded files.
  997.  
  998. æExecuteÆ access is meant for remotely starting programs  and
  999. usually  applies  to specific files. Be careful  in  granting
  1000. this right: For example, allowing a user to start COMMAND.COM
  1001. also  means that this user can delete anything on  your  hard
  1002. disk! More on using this in the æHow to execute programs  via
  1003. FTP with Serv-UÆ section.
  1004.  
  1005. If  you want a user to be able to see a directory listing you
  1006. need  to  specify ælistÆ access. This is often  used  in  the
  1007. opposite  way: For example for an upload directory you  would
  1008. want  a  user  to be able to upload files, but  not  see  and
  1009. certainly  not download anything that is already there.  This
  1010. could  be  done  by  only specifying the æwriteÆ  right,  and
  1011. leaving ælistÆ access unchecked.
  1012.  
  1013. A  somewhat strange attribute in the list is æinheritÆ.  This
  1014. does  not  so much say anything about access for a path,  but
  1015. how that access rule works for subdirectories. When æinheritÆ
  1016. is  checked  the  rule will automatically be  valid  for  all
  1017. subdirectories  of  the  path  in  the  rule,  as  if   these
  1018. subdirectories  inherit  the access  rule.  This  is  usually
  1019. convenient, it means that with a single access rule  you  can
  1020. control access to a whole branch in the directory tree. Also,
  1021. if a user is allowed to create subdirectories, they will have
  1022. the same access rights as the parent if æinheritÆ is checked.
  1023. In short, you are going to want to leave æinheritÆ checked in
  1024. most  cases,  but sometimes it can be convenient  to  specify
  1025. access  for  a  single directory in a tree without  affecting
  1026. subdirectories  and thatÆs when unchecking  it  can  come  in
  1027. handy.
  1028.  
  1029. When  a  user  executes an FTP command  concerning  files  or
  1030. directories, the userÆs access path list is checked to see if
  1031. the  command should be allowed to proceed. Now pay very close
  1032. attention, this is the part of Serv-U that seems  to  be  the
  1033. least  understood: The list is evaluated from top to  bottom,
  1034. and  evaluation stops as soon as an applicable rule is found.
  1035. æApplicableÆ means that if it is a file the user wants to  do
  1036. something with, then the file name must appear in the  access
  1037. path  list, or the directory of the file must be in the list,
  1038. or  finally, a parent directory of the file must  be  in  the
  1039. path  list  with æinheritÆ checked. Directory access  uses  a
  1040. similar mechanism. It follows from this that THE ORDER OF THE
  1041. PATH ACCESS RULES IS IMPORTANT!!! Unless the access rules are
  1042. in the right order you will not get the result you want!
  1043.  
  1044. Since  one  example  can say more than a thousand  words,  or
  1045. something  along  that  line, letÆs work  through  a  typical
  1046. situation. Assume you want to setup an æAnonymousÆ FTP  site.
  1047. This  needs a directory tree with all the goodies  the  users
  1048. might want to download, for which they need read access.  You
  1049. also  need  an  upload directory where users can  upload  new
  1050. goodies,  but you donÆt want others to be able to immediately
  1051. get  their greedy fingers on it, since you want to check  for
  1052. viruses first. So, this upload directory needs write  but  no
  1053. read  access. We decide to put everything on the big  network
  1054. drive,  æY:Æ, under the æANONFTPÆ directory. We  also  create
  1055. the  æUPLOADÆ directory here for uploads. In Serv-U we  would
  1056. create  the  user æAnonymousÆ with the following access  path
  1057. rules (and in this order):
  1058.  
  1059.      Y:\ANONFTP\UPLOAD     - write, inherit rights
  1060.      Y:\ANONFTP            - read, list, inherit rights
  1061.  
  1062. Reversing the rules will not work: If a user tries  to  write
  1063. to  the  upload directory, the security mechanism will  check
  1064. against   Y:\ANONFTP   and  conclude   that   UPLOAD   is   a
  1065. subdirectory, so the rule applies, and the rule  grants  only
  1066. read and list access. Please take note that write access does
  1067. not  allow  a user to get a directory listing of  the  UPLOAD
  1068. directory,  so  not  only wonÆt a user be  able  to  download
  1069. anything from there, the user cannot even see what files  are
  1070. uploaded.
  1071.  
  1072. If  the drive letter is left out of a path, it applies to all
  1073. drives. So, a fast way to get full access to all files on all
  1074. drives is:
  1075.  
  1076.       \                    - read, write, delete, list, make,
  1077.                              remove, and inherit rights
  1078.  
  1079. Now, the same mechanism that determines access to directories
  1080. also  applies  to  files. It is possible to grant  access  to
  1081. specific  files on a per-file basis. LetÆs take the  previous
  1082. example about the anonymous FTP server. We want to put a file
  1083. æSECRET.TXTÆ in the ANONFTP directory, but nobody is  allowed
  1084. to  read  it of course. So, our access paths list would  look
  1085. like this:
  1086.  
  1087.      Y:\ANONFTP\SECRET.TXT - no rights
  1088.      Y:\ANONFTP\UPLOAD     - write, inherit rights
  1089.      Y:\ANONFTP            - read, list, inherit rights
  1090.  
  1091. Again,  the  order of the paths is important!  The  directory
  1092. access   rights   do   not  have  any  meaning   for   files.
  1093. Alternatively,  if SECRET.TXT was a directory  instead  of  a
  1094. file,  the above settings would keep users completely out  of
  1095. this directory.
  1096.  
  1097. 2.5 How to Setup Anonymous Access
  1098. ---------------------------------
  1099.  
  1100. Since setting up anonymous access is such a common task  when
  1101. running a FTP server, I want to present a separate section on
  1102. this  subject. It is not much different from setting  up  any
  1103. other user, so this is going to be a æfollow the recipeÆ kind
  1104. of instruction, with the specifics for anonymous thrown in.
  1105.  
  1106. First,  a  tip:  If you are running Windows 95  it  might  be
  1107. worthwhile to create a new æDriveSpace 3Æ volume with all the
  1108. files you want to make available. This not only provides  you
  1109. with  a  lot  more  space  due to the compression  (which  at
  1110. regular  FTP speeds has no impact on performance),  but  also
  1111. effectively isolates the users from more sensitive areas like
  1112. your  C: drive. So, for the rest of this story I will  assume
  1113. you just created a DriveSpace volume named æF:Æ.
  1114.  
  1115. LetÆs say all the good stuff for our users is going to be  in
  1116. subdirectories of F:\ANONFTP, and we want to allow uploads of
  1117. new files to the F:\ANONFTP\UPLOAD area.
  1118.  
  1119. The  first task in setting up anonymous access is creating  a
  1120. user  with  this name. Thus, go ahead, pull up the  æSetup  -
  1121. UsersÆ  menu and its dialogbox. Fill in the æUsernameÆ  field
  1122. with æAnonymousÆ. The æGroup nameÆ and æPasswordÆ fields stay
  1123. blank, since they are ignored for anonymous anyway. Now,  the
  1124. æHome  directoryÆ  field needs to be set to F:\ANONFTP  since
  1125. that  is  the point we want the users to start when they  log
  1126. in.
  1127.  
  1128. When they log in we want to let them know the especially good
  1129. things and give them instructions on how to upload, and to do
  1130. that  we  need a login message file. Netscape will show  such
  1131. files  in  a  very  nice  way, at the top  of  the  directory
  1132. listing.  So, letÆs create a file named LOGANON.TXT with  the
  1133. following contents:
  1134.  
  1135.      Welcome %name from %IP!
  1136.      For  the  latest in natureÆs feline beauty see directory
  1137.      IMAGES
  1138.      You can hear them in the directory MEOW
  1139.      Please  keep uploads smaller than 100 Kb and place  them
  1140.      in UPLOADS
  1141.  
  1142. Since  I  can imagine that not everyone envisions  cats  when
  1143. hearing  about æpretty picturesÆ please feel free  to  change
  1144. the  text  according to your wishes! The words starting  with
  1145. æ%Æ  are directives to Serv-U which will be replaced by  real
  1146. text  when the user logs in. æ%nameÆ becomes the userÆs name,
  1147. and  æ%IPÆ  either the IP number or the IP name of  the  user
  1148. (whichever  is available). There are many more æ%Æ directives
  1149. and you can find more information about these in the æHow  to
  1150. use sign-on and/or sign-off messagesÆ section.
  1151.  
  1152. Now  letÆs  place the file LOGANON.TXT in F:\ and thus  enter
  1153. F:\LOGANON.TXT in the æMessage fileÆ field.
  1154.  
  1155. WeÆre  almost there, but the users still need access to those
  1156. directories.  So click the æAddÆ button and  enter  the  path
  1157. F:\ANONFTP.  When this is done the access rights are  already
  1158. set,  since the default of æreadÆ, ælistÆ, and æinheritÆ  are
  1159. exactly  what  we  want. Now for the upload directory:  Click
  1160. æAddÆ  again and fill in F:\ANONFTP\UPLOAD. Serv-U will place
  1161. this above the previously entered access rule, which is good.
  1162. However,  the access rights are not exactly what we want,  so
  1163. uncheck æreadÆ, check æwriteÆ and uncheck ælistÆ. You  should
  1164. now  have the following two access rules in the list (In this
  1165. order!):
  1166.  
  1167.      F:\ANONFTP\UPLOAD     - write, inherit rights
  1168.      F:\ANONFTP            - read, list, inherit rights
  1169.  
  1170. This  is  all  we have to do in the æSetup UsersÆ  dialogbox.
  1171. Just  check  if  æEnable accountÆ is checked,  which  is  the
  1172. default. To store it press æStoreÆ.
  1173.  
  1174. There  are a few more things that are important for anonymous
  1175. access.  They  can all be found in the æSetup -  FTP  ServerÆ
  1176. menu  choice. The first field of interest to us is  æMax  no.
  1177. anonymousÆ, this determines how many anonymous users  can  be
  1178. logged in at the same time. If you leave this blank then Serv-
  1179. U will allow any number. Use your own judgment what you think
  1180. your  machine can handle. Next is æTime-out anonymousÆ.  This
  1181. determines how long Serv-U will wait when anonymous users are
  1182. not  doing  anything before kicking them off the server.  The
  1183. default  of  15 minutes is a good value, still allowing  slow
  1184. transfers  and  bad  connections to work  while  keeping  the
  1185. server reasonably clean of all those Netscape users that stay
  1186. logged in after their transfer is long done. Setting the time-
  1187. out  to  0 or leaving it blank means that Serv-U wonÆt  check
  1188. how long a user has been idle.
  1189.  
  1190. This brings us to the æRelative paths anonymousÆ checkbox. By
  1191. default this is checked and it causes anonymous users to  see
  1192. all  directories  and  path  names  relative  to  their  home
  1193. directory.  So, if your anonymous users have æF:\ANONFTPÆ  as
  1194. their  home directory, they will receive back æ/Æ  when  they
  1195. inquire with the PWD command. Similarly, every reference they
  1196. make to a file or a change of directory is taken relative  to
  1197. this path. The main reason it is in there is because most WWW
  1198. browsers  need æchange directoryÆ access to the  æ/Æ  (=root)
  1199. directory to make them work. This way they believe they  have
  1200. access  to  the root and are happy, while on a PC  you  donÆt
  1201. always want to give users access to your real root directory.
  1202. The  disadvantage of having this mechanism is that  anonymous
  1203. users  are restricted to their home directory and below,  nor
  1204. do  they have access to other drives. Sometimes you want them
  1205. to  be able to have access outside their home directory  tree
  1206. and  unchecking this option will allow that. Anonymous  users
  1207. will then be treated like any other user as far as path names
  1208. are  concerned  and they will be able to change  to  parallel
  1209. paths  and  other drives if their access rights permit  this.
  1210. The  price  you pay is that unless you provide some  form  of
  1211. access to the root of their home directory, i.e. æF:\Æ in our
  1212. example, WWW browsers wonÆt be able to log in.
  1213.  
  1214. The last item we need to concern ourselves with for anonymous
  1215. users is the æCheck anon. passwordsÆ option. By default  this
  1216. is  unchecked,  which  means that anonymous  users  can  type
  1217. anything  as  a  æpasswordÆ to get into the server.  If  this
  1218. option is checked, then Serv-U makes sure that the æpasswordÆ
  1219. entered by anonymous users is something that looks like an E-
  1220. mail address. Netiquette prescribes that anonymous users send
  1221. their E-mail address as a password, alas this good custom  is
  1222. disappearing  fast and the latest version of Netscape  (v2.0)
  1223. does not even have the ability to do this anymore. So, unless
  1224. you  want  to severely restrict access and teach people  good
  1225. manners it is probably best to leave this unchecked.
  1226.  
  1227. Just  so  you  know: As is customary for FTP servers,  Serv-U
  1228. also  looks for a æ-æ (hyphen) as the first character of  the
  1229. anonymous  æpasswordÆ. If present, all  login  and  directory
  1230. change messages are suppressed.
  1231.  
  1232. Well,  you made it through and now know just about everything
  1233. there  is to know about setting up anonymous access  to  your
  1234. server. You can enhance things further with sign-on and sign-
  1235. off  messages, directory change messages and links, which are
  1236. covered in the following sections.
  1237.  
  1238. 2.6 How to Use Groups
  1239. ---------------------
  1240.  
  1241. To ease the burden of maintaining a large site somewhat, Serv-
  1242. U  uses  the  concept of ægroupsÆ. This allows you  to  group
  1243. together  users  with similar settings. All the  similarities
  1244. are  stored  in  the  group  information,  leaving  only  the
  1245. differences per user for you to set up.
  1246.  
  1247. To  edit groups select the æSetup - GroupsÆ menu choice.  The
  1248. dialogbox you see should look familiar by now: ItÆs the  same
  1249. one  as  for the user setup. So, if you know how  to  set  up
  1250. users, you also know how to set up groups! The only item that
  1251. is not applicable for groups is the æUsernameÆ field, so this
  1252. is  grayed  out,  instead you use the æGroup nameÆ  field  to
  1253. specify the name of the group you are editing.
  1254.  
  1255. To  show  the power of groups a quick example: LetÆs say  you
  1256. are  the Pentagon system administrator and want to create FTP
  1257. access for everybody in case they are on field trips. So, you
  1258. hook  up  this old PC to the net, install Serv-U and register
  1259. it  (Hypothetical situation). Then you proceed  to  create  a
  1260. group æStarWarsÆ. Now you go on to set the password for  this
  1261. group to æRonaldRÆ, and their home directory (all their files
  1262. are shared anyway) to æy:\super\secret\starwarsÆ. You fill in
  1263. some  access path rules as well, and youÆre all set: The only
  1264. thing  left  is  entering the user names, you donÆt  have  to
  1265. provide any other information per user. A 10 minute job.
  1266.  
  1267. Now  thereÆs this occasional guest user, æBillyCÆ. You  donÆt
  1268. want  him to get into certain directories, so you make him  a
  1269. member  of the group but specify those secret directories  in
  1270. his access path rules with æno accessÆ, and youÆre all done.
  1271.  
  1272. As  you  already  saw  from  the previous  example  the  user
  1273. settings have precedence over the group settings. This allows
  1274. you  to  selectively  override certain  parts  of  the  group
  1275. settings,  making groups a very flexible mechanism  for  user
  1276. maintenance.  To  summarize: Serv-U first checks  the  userÆs
  1277. settings, then looks if the user is part of a group and if so
  1278. uses  this groupÆs settings, and finally, if nothing is found
  1279. yet  the settings of a user with name æALLÆ are used if  they
  1280. exist.  The  only  user that cannot be used together  with  a
  1281. group  is  æAnonymousÆ. For security reasons  only  the  user
  1282. settings themselves are used here.
  1283.  
  1284. Well, by now you know most of what there is to know to run  a
  1285. smooth Serv-U FTP server. The next sections are mostly  about
  1286. goodies  that make life easier or more colorful. Next  youÆll
  1287. learn how to find out what users are doing on your server and
  1288. if they are nasty, how you can boot them off.
  1289.  
  1290. 2.7 How to See Who is Logged In
  1291. -------------------------------
  1292.  
  1293. Even  though Big Brother might not be watching you,  you  can
  1294. certainly  watch your users! Select the æFile  -  User  InfoÆ
  1295. menu  choice  and  up pops the user information  window.  The
  1296. upper  part shows a list of all users currently connected  to
  1297. your  server. By clicking with the mouse on one of the  users
  1298. you  can  get extra information about that user in the  lower
  1299. part of the window.
  1300.  
  1301. There  are  a  few  things  to keep in  mind  concerning  the
  1302. displayed  statistics: The IP name is found by  initiating  a
  1303. reverse DNS lookup of the IP number. It can take time  before
  1304. an answer comes back from the DNS server, and there are quite
  1305. a  few IP numbers that do not have an IP name. So, it is  not
  1306. at all unusual for a user not to have an IP name.
  1307. Then,  the  transfer speed displayed should not be taken  too
  1308. absolute.  Since the socket stack buffers any  send  activity
  1309. (Serv-U can write lots of bytes to the stack in a very  short
  1310. time, after which the stack sends it off at its leisure)  the
  1311. indicated speed can be much higher than it actually is. Also,
  1312. if  there are local transfers going on with a very high speed
  1313. then Serv-U and the socket stack can get into a tight loop of
  1314. sending or receiving, and the user information might not  get
  1315. updated  for  some time. This is normal ("Not a  bug,  but  a
  1316. feature!").
  1317.  
  1318. This  brings us to the æShow CommandsÆ button. Pressing  this
  1319. will  pop up another window which will show you all  the  FTP
  1320. commands  the  user  sends and the replies  from  Serv-U.  It
  1321. tracks  the commands of the in æUser InfoÆ selected user  and
  1322. by clicking on another user you can switch.
  1323.  
  1324. The  last  button of interest in this window has the  prosaic
  1325. name  æKill  UserÆ. This is the place where, if so  inclined,
  1326. you can alleviate all your frustration after a bad day at the
  1327. job.  For  that reason the entire next section is devoted  to
  1328. it.
  1329.  
  1330. 2.8 How to Kick a User Off the Server
  1331. -------------------------------------
  1332.  
  1333. If  someone is doing things you donÆt like, or you just  want
  1334. to be mean, Serv-U offers you the option of kicking that user
  1335. off your server and keeping him or her off.
  1336.  
  1337. This is done by selecting the æFile - User InfoÆ menu choice.
  1338. In the window that pops up as a result you select the user-to-
  1339. be-killed,  and proceed by pressing the æKill  UserÆ  button.
  1340. This  will  pop  up a little dialogbox asking you  if  youÆre
  1341. really sure about this, and offering several options to  keep
  1342. the user in question off on a more permanent basis.
  1343.  
  1344. You  will see two checkboxes. The first is æRefuse IP  access
  1345. in  futureÆ. If you check this and then press æOKÆ the userÆs
  1346. IP  address will be added to the list of IP numbers that  are
  1347. refused  access. This will prevent that user from logging  in
  1348. again,  or at least it not from the same IP number.  We  will
  1349. talk  about  access and IP numbers in greater detail  in  the
  1350. QHow to limit access by IP number sectionÆ.
  1351.  
  1352. The  second  checkbox is æDisable accountÆ and checking  this
  1353. does exactly that: The æEnableÆ checkbox in the æSetup UsersÆ
  1354. dialogbox will be unchecked. Nobody will be able to use  that
  1355. login name until the account has been enabled again.
  1356.  
  1357. 2.9 How to Setup Logging
  1358. ------------------------
  1359.  
  1360. When  you  select the æSetup - LoggingÆ menu choice you  will
  1361. see a dialogbox that lets you specify what events you want to
  1362. log  and  where to log them to: either to screen only  or  to
  1363. both the screen and a logfile.
  1364.  
  1365. The first two items deal with logging to a logfile. The first
  1366. one,  æEnable logging to fileÆ switches writing to a  logfile
  1367. on  or  off. The second item, æLogfileÆ is meant for entering
  1368. the  path  and  file  name into which all  the  messages  are
  1369. written.  Of  course, logging will only  work  when  a  valid
  1370. logfile  name  is  entered, it has to be  a  full  path  name
  1371. including a drive letter.
  1372.  
  1373. Serv-U  gives you a wide choice in what should be  logged  or
  1374. not. In all there are seven different categories that can  be
  1375. individually  enabled  or  disabled.  The  items   are   self
  1376. descriptive  except maybe for three: æLog FTP commandsÆ  logs
  1377. every  command as it is received by the server and  æLog  FTP
  1378. repliesÆ logs the command replies that are sent back  by  the
  1379. server  to the client. These two options are mainly  intended
  1380. for  diagnostic purposes and are switched off by default. The
  1381. last  option is æLog IP namesÆ and when checked, Serv-U  will
  1382. try  to  find  the IP name of a user by doing a  reverse  DNS
  1383. lookup  on  the IP number. Keep in mind that DNS lookups  can
  1384. take  just  about any amount of time, cost a fair  amount  of
  1385. overhead,  and  not all IP numbers have a IP name  associated
  1386. with  it. When this option is checked the IP name of  a  user
  1387. will be logged as soon as it becomes available.
  1388.  
  1389. Messages  are always logged to the Serv-U window,  regardless
  1390. of  the logfile settings. There is no difference between  the
  1391. messages on screen and the ones in the logfile, although some
  1392. things  are  only shown on screen. The latter are server  and
  1393. program  related matters, like version number,  server  going
  1394. on/off-line etc.
  1395.  
  1396. Log  messages  always have the same layout.  The  reason  for
  1397. using such a strict format is to make it easier to search for
  1398. specific  messages  or certain types of messages.  This  also
  1399. makes  it  possible  to  do automatic accounting  by  machine
  1400. reading  the logfile if you need it. The logfile can be  read
  1401. or  copied at any moment, even when Serv-U is running (It  is
  1402. also  possible to get the file via FTP using Serv-U itself!).
  1403. The format is as shown below, in stylized form:
  1404.  
  1405.      [n] DATE TIME - (xxxx) MESSAGE
  1406.  
  1407. The first number, ænÆ, indicates the type of message that  is
  1408. being logged. Currently there are six different categories:
  1409.  
  1410.      1    - system messages (problems etc.)
  1411.      2    - FTP commands (from client to server)
  1412.      3    - GET file transfers
  1413.      4    - PUT file transfers
  1414.      5    - security related events (users logging in etc.)
  1415.      6    - FTP replies (from server to client)
  1416.  
  1417. The  second  number, æxxxxÆ, is a unique  ID  assigned  to  a
  1418. client  the  moment  the  connection  is  made.  All  further
  1419. messages  concerning that client will use  the  same  number.
  1420. Again,  this  was  done  to  make it  easy  to  do  automated
  1421. accounting,  or,  to  find  back events  using  the  æsearchÆ
  1422. facilities of every editor.
  1423.  
  1424. You  can  rename, move or delete a logfile at any time  while
  1425. the  server is running, there is no need to stop the  server.
  1426. You  can even copy a logfile to a remote system using  Serv-U
  1427. itself!  If you want to temporarily stop logging to file  and
  1428. see  it  on screen only, you can uncheck the æFile - LoggingÆ
  1429. option  in  the  main menu. Needless to say this  has  to  be
  1430. checked to enable logging to file.
  1431.  
  1432. One more note: If you log GETs and PUTs then Serv-U will also
  1433. tell you the average transfer speed. For GETs the value Serv-
  1434. U  shows can be a bit optimistic, especially for small files,
  1435. as  a result of the socket stack buffering the bytes that are
  1436. sent over the network. Serv-U can very quickly transfer 10-20
  1437. Kbytes into the socket stack, which then proceeds to send  it
  1438. over  the network at its own leisure. However, Serv-U has  no
  1439. way  of finding out when the actual transfer is complete, and
  1440. assumes  that when it has sent the block to the socket  stack
  1441. it is done.
  1442.  
  1443. Enough boring talk, letÆs get back to the fun part! Next will
  1444. be  explained how you can pour your heart out to  your  users
  1445. through all kinds of messages.
  1446.  
  1447. 2.10 How to Use Sign-on and/or Sign-off Messages
  1448. ------------------------------------------------
  1449.  
  1450. Your  FTP-server can display a welcome message every  time  a
  1451. user connects to it. This can be very useful to provide users
  1452. with  information about your FTP server, like where  to  find
  1453. games, or æSerious SoftwareÆ. Likewise, you might want to say
  1454. good-bye to them when they leave, or remind them to send that
  1455. check  . . . The way to do this is by entering a text in  the
  1456. QSign-on/Sign-offÆ dialogbox which pops up  when  you  choose
  1457. the æSetup - Signon/offÆ menu choice.
  1458.  
  1459. There  are several special words that you can enter  in  your
  1460. sign-on and sign-off text which get expanded while being sent
  1461. to a client. They all begin with æ%Æ. Here is the list:
  1462.  
  1463.      %time         - displays the current time on your PC
  1464.      %date         - displays the current date on your PC
  1465.      %unow         - displays the current number  of  Serv-U
  1466.                      users connected
  1467.      %uall         - displays the number of users since  the
  1468.                      server was started
  1469.      %u24h         - displays the number of users in the  last
  1470.                      24 hours
  1471.      %maxusers     - displays the maximum no. of users, as set
  1472.                      in æSetup - ServerÆ
  1473.      %maxanonymous - the maximum no. of anonymous users, as
  1474.                      set in æSetup - ServerÆ
  1475.      %name         - displays the userÆs login name
  1476.      %ip           - displays the userÆs IP number or name  if
  1477.                      available
  1478.      %dir          - displays the userÆs current directory
  1479.      %disk         - displays the userÆs current disk drive
  1480.      %dfree        - displays the amount of free disk space on
  1481.                      the userÆs current disk
  1482.      %fup          - displays the number of files uploaded  by
  1483.                      the current user
  1484.      %fdown        - displays the number of files downloaded
  1485.      %ftot         - displays  the  total  number  of  files
  1486.                      transferred
  1487.      %bup          - displays the number of bytes uploaded  by
  1488.                      the user
  1489.      %bdown        - displays the number of bytes downloaded by
  1490.                      the user
  1491.      %btot         - displays  the  total  number  of  bytes
  1492.                      transferred
  1493.      %tconm        - displays the total connect time in minutes
  1494.      %tcons        - displays the connect time in seconds - to
  1495.                      be used with æ%tconmÆ
  1496.  
  1497. Not  all  of these directives make sense for both the  signon
  1498. and signoff text: There is little point in putting æ%diskÆ in
  1499. the  signon  message, since the user is not  yet  logged  in.
  1500. Likewise  for  some  other directives.  However,  these  same
  1501. directives can also be used in directory change messages  and
  1502. login  messages, which are covered in the following sections.
  1503. There they can be very useful.
  1504.  
  1505. You could make the following signon text:
  1506.  
  1507.       Welcome, it is %time on %date, and you are user number %unow
  1508.       Over the last 24 hours, %u24h people have visited this site
  1509.  
  1510. IÆm  sure  youÆll figure out by yourself what this will  look
  1511. like to the user . . .
  1512. Please  keep  in  mind that the average client  has  only  80
  1513. characters per line, and the first four are taken up  by  the
  1514. reply code. So keep your lines short if you want the users to
  1515. actually see your prose.
  1516.  
  1517. 2.11 How to Setup User Specific Login Messages
  1518. ----------------------------------------------
  1519.  
  1520. After  astonishing the user with your signon message you  can
  1521. go  for  the  kill  by also providing a user  specific  login
  1522. message.  These messages should be put in one  or  more  text
  1523. files  and  the file name can be filled out in the  users  or
  1524. groups setup dialogbox, in the æMessage fileÆ field.
  1525.  
  1526. The  file name you enter in the æMessage fileÆ field can have
  1527. several forms: You can use an absolute path with a drive, for
  1528. example  C:\FTP\LOGMES.TXT. This will of course  make  Serv-U
  1529. use  this  file. You can also specify only the name,  and  no
  1530. path, for example LOGMES.TXT. This will cause Serv-U to  look
  1531. in the userÆs home directory for this file and if it is there
  1532. it will be displayed to the user. Finally, you can specify  a
  1533. path  but no drive letter, for example \FTP\LOGMES.TXT.  This
  1534. means  that  Serv-U  will add the drive of  the  userÆs  home
  1535. directory  to  make  a  full path. The  latter  two  ways  of
  1536. specifying the file can be very useful for groups, i.e.  with
  1537. just  a single file name set up you can provide all the users
  1538. that are part of that group with a separate login message.
  1539.  
  1540. Of  course,  you can use all the æ%Æ directives mentioned  in
  1541. the previous section in login messages. Try for example:
  1542.  
  1543.      Hello %name from %IP!
  1544.  
  1545. With a little luck Serv-U will have found the IP name of  the
  1546. user  by the time he or she logs in. So you can impress  them
  1547. by   showing  you  know  where  they  are  (Big  Brother   IS
  1548. Watching!).  By the way, Netscape displays the login  message
  1549. in  a  nice looking way at the top of the screen (The sign-on
  1550. message does not get displayed by Netscape).
  1551.  
  1552. 2.12 How to Use Directory Change Messages
  1553. -----------------------------------------
  1554.  
  1555. It  can be very useful to tell a user some specifics when  he
  1556. enters  a  directory. For this purpose Serv-U  has  directory
  1557. change  messages. There can be a different message  for  each
  1558. directory.
  1559.  
  1560. As with the login messages, the directory change message text
  1561. should be stored in a file. In the æSetup - FTP ServerÆ  menu
  1562. choice you can specify which file name Serv-U should look for
  1563. when  the  user changes directory. You can specify  the  file
  1564. name  in two different ways: First is an absolute file  name,
  1565. for  example  C:\FTP\CDMES.TXT. As  youÆd  expect  this  will
  1566. display  that  file  for each directory change.  Then  it  is
  1567. possible  to  use  a  file name only without  the  path,  for
  1568. example CDMES.TXT. This will make Serv-U look for and display
  1569. the file with that name, in the directory into which the user
  1570. is changing. The latter one is the usual way to use directory
  1571. change  message files, since this enables you  to  specify  a
  1572. different message for each directory.
  1573.  
  1574. Like sign-on and sign-off messages you can use any of the æ%Æ
  1575. directives in directory change messages. Take a look  at  the
  1576. previous sections for a list of all directives.
  1577.  
  1578. Netscape will display those directory change messages at  the
  1579. top  of the page. One more trick: Anonymous users cannot  see
  1580. æhiddenÆ  files. Hidden files are files with the  DOS/Windows
  1581. æhiddenÆ  attribute set, something you can do using  the  DOS
  1582. program æAttribÆ or by changing the æpropertiesÆ of a file in
  1583. Win95  (using the right mouse button). So, if you  make  your
  1584. directory change message files hidden they wonÆt show  up  in
  1585. the directory listings while anonymous users still get to see
  1586. the messages.
  1587.  
  1588. 2.13 How to Use Links α la UNIX
  1589. -------------------------------
  1590.  
  1591. Now  for  the  piΦce de resistance (pardon my French),  which
  1592. sets Serv-U miles apart from any other FTP server that I know
  1593. of for MS-Windows: Links!
  1594.  
  1595. If  you know UNIX then you know what I am talking about  when
  1596. links  are  mentioned. If not, then try the following:  Links
  1597. are  names  of  files and/or directories that appear  in  the
  1598. directory listing but they are not in the directory that  the
  1599. user  is  listing. Rather, they point to the actual directory
  1600. or  file and can be used by the user as if they were the real
  1601. thing  itself. A little like the Windows 95 æshortcutsÆ,  but
  1602. more  real: When you delete a link through Serv-U the  actual
  1603. file  or  directory is gone! The great value of links  is  in
  1604. showing  users that you have all kinds goodies  available  on
  1605. other  disk drives. The user can then simply æcdÆ to  a  link
  1606. and   thus  change  to  a  completely  different  drive   and
  1607. directory.
  1608.  
  1609. The  way  Serv-U works with links is by reading them  from  a
  1610. text  file.  You can have different files and thus  different
  1611. links  for  each  directory, much in  the  same  way  as  the
  1612. directory  change messages work in the previous section.  The
  1613. file  name  is  entered via the æSetup  -  FTP  ServerÆ  menu
  1614. selection  (Guess where!). As with message  files  there  are
  1615. several  ways  to specify which file Serv-U  should  use  for
  1616. links:  You  can  enter a file name by  itself,  for  example
  1617. LINKS.TXT.  This makes the server look in the userÆs  current
  1618. directory for a file with this name and if found it is merged
  1619. into  the  directory  listing. This is  the  way  to  set  up
  1620. different link files for each directory. The second method is
  1621. by specifying a full path name, for example C:\FTP\LINKS.TXT.
  1622. As  youÆd  expect the result will be that the same links  are
  1623. shown in each directory. Finally, you can leave out the drive
  1624. letter,  for example \FTP\LINKS.TXT, which means Serv-U  adds
  1625. the  current drive to the name and then looks for  the  file.
  1626. Useful  for setting up links that change per drive,  but  not
  1627. per directory. If you make the link fileÆs attribute æhiddenÆ
  1628. then  anonymous  users wonÆt see the file  itself  appear  in
  1629. their  directory listings while they still  get  to  see  the
  1630. links.
  1631.  
  1632. Now, what should a link file look like? Each line of the file
  1633. describes a different link. First comes the link name,  which
  1634. is  what  the user is going to see in the directory  listing,
  1635. then a æ|Æ which acts as a separator, and finally the file or
  1636. path  that the link should point to. Here is an example  link
  1637. file that should make all this a little clearer:
  1638.  
  1639.      D-Drive         | d:\
  1640.      CD-ROM          | f:\
  1641.      Home            | ~
  1642.      Fun Stuff       | g:\public\games
  1643.      One up          | ..
  1644.      Pointless       | \junk\..\more\..
  1645.      Poem            | c:\culture\poem.txt
  1646.  
  1647. As  far  as the user is concerned links behave like the  real
  1648. thing: They can be used for æcd æ if itÆs a directory,  ægetÆ
  1649. for  a  file  etc. Only difference is that  if  a  link  gets
  1650. deleted  the file or directory it points to will get  deleted
  1651. but  the  link  will  continue to show up  in  the  directory
  1652. listing. Needless to say that it is your responsibility  that
  1653. the links in a link file point to something that makes sense.
  1654.  
  1655. So  much  for the fun part, back to more serious matter  with
  1656. more  about how to select whom you want to let on your server
  1657. and whom to bounce. . .
  1658.  
  1659. 2.14 How to Limit Access by IP Number
  1660. -------------------------------------
  1661.  
  1662. This  æSetup - IP AccessÆ menu choice will pop up a dialogbox
  1663. which  provides  the  means to restrict access  to  your  FTP
  1664. server to certain IP-numbers. If  for example, you work at  a
  1665. university and only want your faculty members to be  able  to
  1666. access the server, then this is a great way to do it. In  the
  1667. upper left corner of the dialogbox you can choose which  type
  1668. of  rules  you want to specify: æDenyÆ or æAllowÆ rules.  The
  1669. deny  rules  decide who should be kept out, the  allow  rules
  1670. indicate  who should be welcomed. THE ORDER OF THE  RULES  IS
  1671. IMPORTANT! When a client contacts the server, the deny  rules
  1672. are  looked  at  FROM TOP TO BOTTOM. If no matching  rule  is
  1673. found,  the  allow  rules are evaluated, again  from  top  to
  1674. bottom.  The  first matching rule applies, and evaluation  is
  1675. stopped. If there are no IP-access rules everybody can  enter
  1676. the  FTP  server.  As soon as there is one rule,  only  those
  1677. clients that pass the rule check are allowed to enter.
  1678.  
  1679. You  can  type in a new rule in the æRuleÆ edit and then  use
  1680. the  æAddÆ  button to add the rule to the list. The  æRemoveÆ
  1681. button will remove the currently selected rule from the list.
  1682. To  change the order of the rules you have to select  one  by
  1683. clicking  the mouse on it, and then use the æUpÆ  and  æDownÆ
  1684. buttons to move it around.
  1685.  
  1686. Rules  are  nothing more than IP-numbers  or  ranges  of  IP-
  1687. numbers. There are two special characters: the star  æ*Æ  and
  1688. the  hyphen æ-Æ. A star functions as a wildcard for  checking
  1689. the number. Any number will match that section of the rule if
  1690. it  is  a  star.  The  hyphen is used to denote  a  range  of
  1691. numbers. Simply separate the starting and ending values by  a
  1692. hyphen. For example, say all IP-numbers in your company  look
  1693. like 134.56.34.xxx with æxxxÆ being any number. Now, you want
  1694. to  restrict  access to your FTP server to other  members  of
  1695. your  company only. The way to do it is to create an  æAllowÆ
  1696. rule that looks like this:
  1697.  
  1698.      134.56.34.*
  1699.  
  1700. ThatÆs  simple,  isnÆt it!? Likewise, if you  know  that  the
  1701. competition  has IP-numbers in the range 168.76.xxx.xxx,  you
  1702. can keep them out of your server with the æDenyÆ rule:
  1703.  
  1704.      168.76.*.*
  1705.  
  1706. Now,  you  need  to  share some of  your  files  with  a  few
  1707. colleagues,  and management in your company is too  cheap  to
  1708. install a local network. You find out that their PCÆs have IP-
  1709. numbers  134.56.34.128, 134.56.34.129 and 134.56.34.130.  You
  1710. could  of course make three æAllowÆ rules, each with  one  of
  1711. these  numbers. A faster way to do this is to make  a  single
  1712. rule like this:
  1713.  
  1714.      134.56.34.128-130
  1715.  
  1716. The  special characters æ*Æ and æ-Æ donÆt need to be  at  the
  1717. end  of the IP-numbers, any place will do. The rule 221.*.76-
  1718. 154.89 is perfectly OK. I wouldnÆt know when youÆd need this,
  1719. but,  hey, the world is a strange place! Remember,  order  is
  1720. important  and  deny  rules are always evaluated  before  the
  1721. allow rules. Experiment a bit, and youÆll get the hang of it.
  1722.  
  1723. Since  people  keep  asking me this: A few  words  about  the
  1724. security  of  IP-access rules. The check on IP number  stands
  1725. pretty  much at the top of the Serv-U security mechanism  and
  1726. all  connections  have  to pass through  this  rather  narrow
  1727. bottle  neck. The code that does the checking is quite simple
  1728. (In  contrast to the code that does the access rule  checking
  1729. for paths), so it is unlikely that there are any loopholes or
  1730. bugs  left in there. So, in my humble and honest opinion this
  1731. is  one  feature that makes for a very secure FTP  server  if
  1732. that is what you need!
  1733.  
  1734. 2.15 How to Print via FTP
  1735. -------------------------
  1736.  
  1737. Serv-U  also  allows  access to all PC  ports:  PRN:,  LPT1:,
  1738. LPT2:,  LPT3:, LPT4:, AUX:, COM1:, COM2:, COM3:,  and  COM4:.
  1739. This  can  be  a  convenient way of setting  up  a  ænetworkÆ
  1740. printer by transferring files directly to PRN: or LPT1: using
  1741. FTP. These ports are treated like any regular path name, so a
  1742. user needs access rights to use them. Thus, to make a printer
  1743. on  PRN:  accessible and a modem on COM2: the user needs  the
  1744. following   access   rights  in  the   æSetup   Users/GroupsÆ
  1745. dialogbox:
  1746.  
  1747.      PRN:                  - write and delete rights
  1748.      COM2:                 - read, write and delete rights
  1749.  
  1750. There seems to be much confusion on how to actually use  this
  1751. feature,  therefore a short explanation. These  ports  behave
  1752. very  much like files that always exist and can be  found  in
  1753. every  directory  although they donÆt show  up  in  directory
  1754. listings. So, no æcdÆ commands are needed, just transfer your
  1755. file-to-print  to the port with the printer.  For  a  command
  1756. line  FTP client this would look like æput FILE.TXT PRN:Æ  to
  1757. print  file FILE.TXT on a printer attached to port PRN:.  For
  1758. point-and-click type FTP clients you have to specify that  it
  1759. should  ask  you  for the destination file name.  Then,  when
  1760. prompted  for the destination file name you enter  æPRN:Æ  or
  1761. another  port  of your choice. For example, for  the  popular
  1762. client  WS_FTP you have to check the æPrompt for destinations
  1763. file  namesÆ  option in the æSession OptionsÆ section.  After
  1764. doing  that  you can simply upload the file-to-print  and  it
  1765. will  ask you for the destination, for which you fill in  the
  1766. printer port name.
  1767.  
  1768. The  above procedure should work well to print ASCII text and
  1769. text-based   protocols  like  PostScript  (If  your   printer
  1770. supports  it).  However, with binary files your  mileage  may
  1771. vary:  It seems that the port closes when a ^D is encountered
  1772. in the stream that is being printed.
  1773.  
  1774. 2.16 How to Execute Programs via FTP with Serv-U
  1775. ------------------------------------------------
  1776.  
  1777. Serv-U  allows you to start DOS or Windows programs  remotely
  1778. using a FTP client. Keep in mind though that Serv-U is not  a
  1779. Telnet  server,  and any program output or  windows  will  be
  1780. displayed  at  the PC where Serv-U is running.  However,  for
  1781. many  applications the ability to start a program is  enough,
  1782. or  you might be able to redirect input and output, i.e. like
  1783. æMYPROG.EXE < INPUT.TXT > OUTPUT.TXTÆ.
  1784.  
  1785. The  first  requirement to using remote program execution  is
  1786. that  the  user needs sufficient access rights to  start  the
  1787. desired programs. This is controlled by the æexecuteÆ  access
  1788. right  in the æSetup Users/GroupsÆ dialogbox. You can  either
  1789. give a user execute access to the directory where the program
  1790. can  be found, or you can specify the exact program name. For
  1791. example,  if  we  want  to  be able  to  execute  COMMAND.COM
  1792. remotely,  and  this  program can  be  found  in  the  C:\DOS
  1793. directory, then the following access rule would do the trick:
  1794.  
  1795.      C:\DOS\COMMAND.COM    - execute access
  1796.  
  1797. Now, to actually start a program remotely you need to use the
  1798. FTP  command  æSITE  EXECÆ from the FTP client.  Usually  you
  1799. cannot  do that directly, since the client doesnÆt understand
  1800. this command, and you need to tell the client to send it as a
  1801. literal string to the server. for example the UNIX FTP client
  1802. (and  others like it, as the one that comes with  Windows  95
  1803. and  NT)  uses the æQUOTEÆ command for this purpose.  So  the
  1804. full  command line to let COMMAND.COM copy a file from  A.TXT
  1805. to B.TXT would become:
  1806.  
  1807.      QUOTE SITE EXEC C:/DOS/COMMAND.COM COPY /B A.TXT B.TXT
  1808.  
  1809. You  might notice the use of æ/Æ instead of æ\Æ in the  path.
  1810. This  is  because most command line FTP clients do  not  take
  1811. kindly to backslashes. For Serv-U it doesnÆt  matter and  you
  1812. can  use  æ/Æ  and æ\Æ alike. You can also  see  that  it  is
  1813. possible  to  specify  arguments to a program  as  you  would
  1814. usually do, Serv-U passes them on to the program. The example
  1815. above will likely only work for command line FTP clients that
  1816. are  based  on  the  UNIX  client. For  point-and-click  type
  1817. clients, like WS_FTP you are on your own. They may or may not
  1818. have  the ability to send literal commands to the server  but
  1819. the way to get that done will vary from client to client.
  1820.  
  1821. Starting programs remotely may not be as straight forward  as
  1822. it  seems,  and  can  have varies side  effects.  Also,  some
  1823. programs  need  to  be  started via the command  interpreter,
  1824. COMMAND.COM,  others not. In short: Some  experimentation  is
  1825. recommended!
  1826.  
  1827. One  more  important thing about æexecuteÆ  access:  Although
  1828. Serv-U checks the programÆs path for access, the program  you
  1829. start  this way is free to access and delete any file in  any
  1830. directory  on  your  computer! Also, if  you  give  æexecuteÆ
  1831. access to a directory then any program in the DOS path can be
  1832. started! In short: Be very careful with æexecuteÆ access,  as
  1833. this is a very big potential security hole!
  1834.  
  1835. 2.17 How to Use Serv-U with æSLIP/PPP EmulatorsÆ
  1836. ------------------------------------------------
  1837.  
  1838. More  and  more  Internet  Access Providers  these  days  are
  1839. offering Internet connections that are not ærealÆ. Instead of
  1840. having  their own IP address these connections run on top  of
  1841. the  IP  address of a UNIX host system. The general name  for
  1842. this  category of connections is æSLIP/PPP emulatorsÆ  and  a
  1843. few of the popular programs that will do that are æTIAÆ (=The
  1844. Internet  Adapter),  æTWinsockÆ, and æPipelineÆ.  The  reason
  1845. ISPÆs use them is because they offer a cheap way to get  many
  1846. people  connected  to  the net. They usually  work  fine  for
  1847. programs  like Netscape, mail, and FTP clients. However,  for
  1848. servers they come with a number of build-in disadvantages.
  1849.  
  1850. Because  of  the way they have to do their work they  have  a
  1851. number  of  peculiarities. Since the PC has to share  the  IP
  1852. number with the host system you will generally not be able to
  1853. use  the default port 21 for Serv-U. Instead, you either have
  1854. to  use  a high port number (generally above 8000) or set  up
  1855. 'port  redirection'. Ask your Internet provider  for  details
  1856. about  the  latter. A related problem is that the  IP  number
  1857. displayed by Serv-U is, in this case, not the IP number  that
  1858. clients  should use to contact your server. It  is  merely  a
  1859. dummy  to  keep  the socket stack of the PC  happy.  For  the
  1860. outside  world the IP number of your server is  the  same  as
  1861. that  of the emulator host system, i.e. that of your Internet
  1862. provider. Another special effect is that clients will not  be
  1863. able  to  use 'passive' mode for data transfers.  This  means
  1864. that  regular FTP clients will work OK, but WWW browsers like
  1865. Netscape and Mosaic will not work when Serv-U runs via a SLIP
  1866. emulator.  For  the same reason it won't be possible  to  use
  1867. clients that are also connected via a SLIP emulator either.
  1868.  
  1869. Just  in  case you are interested IÆll give you the technical
  1870. details  behind all this. Since Serv-U has to  share  the  IP
  1871. number  with the Internet connection host system  (Usually  a
  1872. UNIX system), the usual FTP port (number 21) will most likely
  1873. be  already in use by the host system. Because at a single IP
  1874. address there is only a single port 21 this means either Serv-
  1875. U  or  the host has to move to another port. The second  side
  1876. effect has to do with the socket stack: They usually need  to
  1877. know  their  own IP address to do the work, and to  keep  the
  1878. stack  happy  it is installed with a non-existent  IP  number
  1879. like  192.0.2.1  (Seems  to  be a popular  choice).  The  FTP
  1880. protocol  does  not use the server side IP number  much,  the
  1881. only  exception is the FTP æPASVÆ command, which is used  for
  1882. passive mode data transfers (Which all WWW browsers use).  In
  1883. essence, what the PASV command does is ask the server for  an
  1884. IP  address and port number where it will listen for the data
  1885. connection.  Since  the FTP server does  not  know  that  its
  1886. address  is bogus, it will trustfully report this  back.  The
  1887. client will then try to connect to this dummy address,  which
  1888. of course will never work.
  1889.  
  1890. 2.18 How to use Netscape to access Serv-U
  1891. -----------------------------------------
  1892.  
  1893. You  might  not  be aware of it, but Netscape and  other  WWW
  1894. browsers  can  do  a whole lot more than just  anonymous  FTP
  1895. access. The general syntax for FTP is the following:
  1896.  
  1897.      FTP://<user>:<password>@<IP address>/<path/file>
  1898.  
  1899. Very  little of this is needed and in its simplest  form  you
  1900. only  use  the  <IP  address>  which  results  in  the  usual
  1901. anonymous  access. If you add a <user> section  (leaving  out
  1902. the password) then Netscape will prompt you for a password if
  1903. needed.  Of  course,  you can also specify  the  password  by
  1904. yourself by adding the <password> section. So far we did  not
  1905. use  the <path/file> section and this means the user will end
  1906. up  in his or her home directory. If you want to go somewhere
  1907. else  you  can tell Netscape to do this with the  <path/file>
  1908. section.
  1909.  
  1910. In the <path/file> section you should use æ/Æ instead of æ\Æ,
  1911. and  you can add a drive letter as part of the path.  So,  to
  1912. finish up with an example that uses all of the above:
  1913.  
  1914.      FTP://john:secret@ftp.cat-soft.com/f:/john
  1915.  
  1916. This would log John into the Cat Soft server.
  1917.  
  1918. By the way, did you know that the newest version of Netscape,
  1919. v2.0, can also upload files to a FTP server? To do so, simply
  1920. drag  the  file-to-upload  from æExplorerÆ  (the  Win95  file
  1921. manager),  or from the æFile ManagerÆ (in NT or Windows  3.1)
  1922. to the Netscape window and drop it there. Experiment & Enjoy!
  1923.  
  1924. 2.19  How to Let the Whole World into Your Server (and Delete
  1925. All Your Files)
  1926. -------------------------------------------------------------
  1927.  
  1928. Even  for  those with a PC-oriented exhibitionist inclination
  1929. Serv-U  has  something to offer. You can let the whole  world
  1930. into your server and have them delete all your files. To  top
  1931. it off, if set up correctly they will reformat your hard disk
  1932. along the way too!
  1933.  
  1934. The  easiest  way to all that fun is to uncheck  the  æEnable
  1935. securityÆ  checkbox  in  the æSetup ServerÆ  dialogbox.  This
  1936. utterly  and completely disables all security in  the  server
  1937. and  thus offers the most comfort to your FTP users. Not only
  1938. can they freely copy and delete each and every file, they can
  1939. also  use  the  unique Serv-U feature that  lets  them  start
  1940. programs  remotely.  Of course, the fun  is  over  once  they
  1941. remotely  start FORMAT.COM, but what the heck,  it  was  nice
  1942. while it lasted!
  1943.  
  1944. Now,  for  those  that are a little æsarcasm inhibitedÆ  IÆll
  1945. spell it out: NEVER, NEVER, NEVER LEAVE THE æENABLE SECURITYÆ
  1946. OPTION  SWITCHED  OFF  IF YOUR SERVER  IS  CONNECTED  TO  THE
  1947. INTERNET!!!  This might all seem a bit overkill, but  believe
  1948. it or not, I quite regularly get E-mail from people that tell
  1949. me  they are running Serv-U exactly like that on the Net. Now
  1950. donÆt tell me I didnÆt warn you. . .
  1951.  
  1952. 2.20 How to use multi-homed IP support
  1953. --------------------------------------
  1954.  
  1955. If  your  operating system supports it, and you have multiple
  1956. IP  addresses installed at your computer (Typically  this  is
  1957. done  in  NT),  you  can let Serv-U respond  differently  for
  1958. different IP addresses that the users connects to. To make it
  1959. a  little  clearer  a  small example: Say  you  have  two  IP
  1960. addresses   assigned   to   your   PC,   152.3.110.167    and
  1961. 152.3.110.168,  which  correspond  to  IP  names   "ftp1.cat-
  1962. soft.com" and "ftp2.cat-soft.com" respectively. Now you  want
  1963. anonymous  users logging into the "ftp1" IP address  to  have
  1964. access  to different files and directories from those logging
  1965. into "ftp2". This is called multi-homed IP, and supported  by
  1966. Serv-U.
  1967.  
  1968. The  first  step  to  using this is  in  the  æSetup  ServerÆ
  1969. dialogbox. Press the button labeled æIP HomesÆ in there. Then
  1970. use  the  screen that pops up to enter all the IP numbers  of
  1971. your  PC.  When this is done you can go to the æSetup  UsersÆ
  1972. dialogbox, which will now show a new selection list with  all
  1973. your IP numbers. Just set up the users as you did before, and
  1974. select  the  appropriate IP number that should be  associated
  1975. with  that  user name.  This will allow you, for example,  to
  1976. make  several  users  named æanonymousÆ, each  responding  to
  1977. different  IP addresses. ThatÆs all there is to using  multi-
  1978. homed IP, it could not be easier!
  1979.  
  1980.  
  1981. 3. The Inner Workings
  1982. =====================
  1983.  
  1984. Before  I  go  on to describe the settings of the  SERV-U.INI
  1985. file  I  want to spend a few words describing how Serv-U  was
  1986. made and how it goes about its job.
  1987.  
  1988. 3.1 Serv-U Internals
  1989. --------------------
  1990.  
  1991. The  program was written using Borland C++ version 4.52  (for
  1992. the 16-bit version) and version 5.0 (for the 32-bit version).
  1993. To  check  for  shaky pointers and catch all  those  resource
  1994. leaks  the  program Bounds Checker version 3.01 from  Nu-Mega
  1995. was  used.  I think no serious Windows programmer  should  be
  1996. without the latter, very highly recommended!
  1997. This  whole  project started about two years ago  after  much
  1998. disappointment with the existing FTP servers for WinSock.  In
  1999. its current version it consists of a bit over 18000 lines  of
  2000. C++  code, divided into 29 C++ classes. The whole program was
  2001. constructed from scratch, not using any existing  FTP  server
  2002. code, and is tailored to MS-Windows and WinSock.
  2003.  
  2004. Internally, everything is very much compartmentalized,  using
  2005. a  different class for different partial tasks.  There  is  a
  2006. WinSock  class library, providing hi-level access to  Windows
  2007. Sockets and hiding all the nasty parts of dealing with  them.
  2008. It uses 100% asynchronous WinSock functions (also called ænon-
  2009. blockingÆ  functions)  thus avoiding problems  with  multiple
  2010. active sockets for a single task and re-entry. There is a FTP-
  2011. manager  class,  taking care of listening  for  clients,  and
  2012. setting  up  instances of the FTP-command  interpreter  class
  2013. when  this happens. The latter does the actual interpretation
  2014. of  the  FTP  commands,  talking to the  security  class  for
  2015. clearance  and  the  WinSock class for  communications.  Then
  2016. there are some utility-like classes, like those dealing  with
  2017. setup  and  logging.  By having all these  compartments  that
  2018. handle  very well defined tasks, I hope to be able to  easily
  2019. extend  this  FTP  server  and  fix  those  (hopefully   few)
  2020. remaining bugs quickly!
  2021.  
  2022. The  32-bit version of Serv-U is not multi-threaded, a single
  2023. thread  is used for all clients. æMulti-threadingÆ is one  of
  2024. those  buzz  words  that are poorly understood  by  most  and
  2025. abused  by  many. æThreadsÆ are light-weight processes,  that
  2026. can  be used to run concurrent tasks without all the overhead
  2027. of  creating real processes. In the mainframe world this  has
  2028. traditionally been used for servers: Each client would  start
  2029. a separate process or thread. However, unless you are running
  2030. NT  on a multi-processor machine (and I wager that now we are
  2031. talking  about  much  less than 1% of all NT  installations),
  2032. multi-threading is not generally going to gain  you  anything
  2033. because thread maintenance and switching brings overhead with
  2034. it.  There are still good reasons for using multiple  threads
  2035. on  a  single  processor machine: For independent  background
  2036. tasks, like a printer spooler, it makes perfect sense.  Also,
  2037. if  a process needs to perform multiple concurrent tasks that
  2038. each  would  take a long time (and ælongÆ in  computer  terms
  2039. could  mean anything over a few tens of milliseconds),  using
  2040. multi-threading is a good practice. However, for servers  the
  2041. practice  of  starting a separate thread for each  client  is
  2042. usually to provide an easy way out of programming the  thing.
  2043. That way the programmer can use æblockingÆ sockets and simply
  2044. block  (i.e.  ædo nothingÆ) until something  happens  on  the
  2045. socket stack. Makes for much simpler programs and is used for
  2046. all  the UNIX servers, so anything ported from there will  be
  2047. coded in this fashion. The better way to do things in Windows
  2048. is  to  make  the program event-driven and let it respond  to
  2049. messages from the socket stack instead of blocking the  task.
  2050. This  means æasynchronousÆ sockets have to be used,  and  the
  2051. whole  program is much harder to make: Instead  of  a  single
  2052. easy  to  follow  flow the program now becomes  a  number  of
  2053. message  handler routines that can be called  in  any  order.
  2054. Serv-U  only  uses asynchronous sockets, and the response  to
  2055. each  socket stack message normally does not take much  time.
  2056. Thus,  a  single thread can handle this perfectly  well,  and
  2057. cutting  it  up  in multiple threads would only  slow  things
  2058. down.
  2059.  
  2060. 3.2 The SERV-U.INI File
  2061. -----------------------
  2062.  
  2063. All the settings for the server, users, and groups are stored
  2064. in  a  single file in text format. This file is always  named
  2065. SERV-U.INI.  When the program is started it  looks  for  this
  2066. file  in  a  number of different places: First the  directory
  2067. with  SERV-U.EXE  is checked. If no .INI  file  is  found  an
  2068. environment  variable  SERV-U is checked.  If  this  variable
  2069. exists  it  should  be  set to the path where  SERV-U.INI  is
  2070. found.  Finally, if this variable does not exist,  the  whole
  2071. DOS  path is scanned, including the Windows directories.  The
  2072. first SERV-U.INI file found on the way is used. If after  all
  2073. the  above  no  .INI file has been found,  the  program  will
  2074. create  one in the directory of  the Serv-U program.  Use  of
  2075. the  SERV-U  environment variable and the DOS path  makes  it
  2076. easy  to  set things up for network users where  there  is  a
  2077. single copy of the program but all the users needs their  own
  2078. settings. Serv-U uses the Windows built-in functions to  read
  2079. and  write  from/to the .INI file. A consequence of  this  is
  2080. that  the total size of SERV-U.INI can never exceed 64 Kbytes
  2081. on  Windows 3.1, 3.11 and Win95, limiting the number of users
  2082. that  can be set up. On NT there seems to be no limit to  the
  2083. .INI file.
  2084.  
  2085. WeÆll  now  go  over all the items that can appear  in  SERV-
  2086. U.INI. I will show you an invented setup file:
  2087.  
  2088.      [GLOBAL]
  2089.      Security=TRUE
  2090.      PortNr=21
  2091.      MaxNrUsers=15
  2092.      MaxNrAnonymous=10
  2093.      Invisible=TRUE
  2094.      Logfile=c:\serv-u\logfile.txt
  2095.      Logging=YES
  2096.      TimeoutUser=600
  2097.      TimeoutAnonymous=15
  2098.      TryOut=Crippled
  2099.      LogGETs=ON
  2100.      LogPUTs=ON
  2101.      LogSystemMes=ON
  2102.      LogSecurityMes=ON
  2103.      LogFTPCommands=OFF
  2104.      LogFTPReplies=OFF
  2105.      LogIPNames=ON
  2106.      RegistrationKey=S%FgdfsdEvG,Rob Beckers,Cat Soft
  2107.      AnonRelPaths=YES
  2108.      Window=100,100,400,300
  2109.      UserInfoWin=409,300
  2110.      DirChangeMesFile=index.txt
  2111.      LinkFile=link.txt
  2112.      CheckAnonPass=OFF
  2113.      Version=2.0.3.11
  2114.      
  2115.      [SIGNONOFF]
  2116.      SignOn1="Welcome to Robby's FTP-Server!"
  2117.      SignOn2="It  is  %time on %date and  you  are  user  no.
  2118.      %unow"
  2119.      SignOff1="Thanks for logging in!"
  2120.      SignOff2="Hope to see you again soon . . ."
  2121.      
  2122.      [IP-ACCESS]
  2123.      Bounce1=132.68.175.201
  2124.      Bounce2=223.*.*.*
  2125.      Allow1=132.68.176.53
  2126.      Allow2=132.68.175.*
  2127.      Allow3=101.43.23.30-40
  2128.      
  2129.      [USER=Anonymous@2]
  2130.      HomeDir=d:\anonftp2
  2131.      Access1=d:\anonftp2\upload,WP
  2132.      Access2=d:\anonftp2,RLP
  2133.      LoginMesFile=logmes.txt
  2134.      
  2135.      [USER=Anonymous@1]
  2136.      HomeDir=d:\anonftp1
  2137.      Access1=d:\anonftp1\upload,WP
  2138.      Access2=d:\anonftp1,RLP
  2139.      LoginMesFile=logmes.txt
  2140.      
  2141.      [USER=Rob]
  2142.      Group=system
  2143.      Password=WdRx.Jlk0kemm%
  2144.      HomeDir=c:\
  2145.      Access1=\,RWMCDLPE
  2146.      Access2=lpt1:,WM
  2147.      Access3=prn:,WM
  2148.      Access4=aux:,WM
  2149.      Access5=lpt2:,WM
  2150.      Access6=lpt3:,WM
  2151.      Access7=lpt4:,WM
  2152.      Access8=com1:,RWM
  2153.      Access9=com2:,RWM
  2154.      Enable=YES
  2155.      
  2156.      [USER=ALL]
  2157.      HomeDir=y:\
  2158.      Access1=y:\,RL
  2159.      Enable=NO
  2160.      
  2161.      [GROUP=SYSTEM]
  2162.      Access1=c:\system,RWDCMLEP
  2163.      Access2=d:\,RWDCMLEP
  2164.      Access3=y:\novell,RWDLP
  2165.      
  2166.      [IP-HOMES]
  2167.      IP1=152.3.110.168
  2168.      IP2=152.3.110.169
  2169.      
  2170.      [EXTERNAL]
  2171.      ClientCheckDLL1=CHKNOVELL.DLL
  2172.      ClientCheckDLL2=CHKNT.DLL
  2173.      
  2174.      
  2175. All  but  four  of  these settings can  be  changed  and  set
  2176. interactively  through the æSetupÆ menus. The exceptions  are
  2177. the entries for æInvisibleÆ, æRegistrationKeyÆ, æWindowÆ, and
  2178. æUserInfoWinÆ,  and if you really desire a user  to  have  no
  2179. password,  that  userÆs  æPassword=æ  entry  has  to  be  set
  2180. manually  (i.e.  nothing after the æ=Æ sign to  indicate  æno
  2181. passwordÆ).
  2182.  
  2183. The following paragraphs will describe each section and entry
  2184. in more detail.
  2185.  
  2186. [GLOBAL]
  2187. All  the settings related to the Serv-U program itself,  i.e.
  2188. the  functioning of the FTP server and system functions,  are
  2189. found  in  the  æ[Global]Æ section. For the file  formats  of
  2190. directory change message files and  link files please see the
  2191. appropriate æHow to . . .Æ section.
  2192.  
  2193. If  security should not be enforced, the æSecurityÆ entry can
  2194. be set to FALSE or 0. Doing so will leave the FTP server wide
  2195. open to everybody!!! Default value for æSecurityÆ is TRUE.
  2196.  
  2197. The  æPortNrÆ  entry determines the IP port that  the  server
  2198. will listen on. Default value is 21.
  2199.  
  2200. To  limit  the  maximum  number  of  simultaneous  users  the
  2201. æMaxNrUsersÆ  entry should be set to the desired  number.  No
  2202. entry  or  a negative number results in no maximum, only  the
  2203. number of available sockets will limit the number of users in
  2204. that  case. Similarly, the æMaxNrAnonymousÆ entry limits  the
  2205. maximum  number of æAnonymousÆ users. The value put  here  is
  2206. only   meaningful  if  it  is  smaller  than  that   of   the
  2207. æMaxNrUsersÆ entry.
  2208.  
  2209. For  system  managers  that donÆt want their  users  to  mess
  2210. around with the server settings, it is possible to make Serv-
  2211. U  invisible by setting the æInvisibleÆ entry to TRUE, or YES
  2212. and  put the Serv-U program in the æstartupÆ group. When this
  2213. is done the server will not show up in the task manager list.
  2214. One  consequence is that there is no way to stop the  program
  2215. short of exiting Windows. Default is NO for this entry.
  2216.  
  2217. The æLogFileÆ entry should specify a full path and name for a
  2218. logfile  if logging is desired. There is no default  logfile.
  2219. To actually switch logging on and off the æLoggingÆ entry can
  2220. be  set to ON or TRUE, or OFF or FALSE. Switching logging  ON
  2221. will  only  work  if  a  logfile  is  specified.  By  default
  2222. æLoggingÆ is set to ON.
  2223.  
  2224. The  entries æTimeOutUserÆ and æTimeOutAnonymousÆ  specify  a
  2225. time-out  in  minutes  for  respectively  regular  users  and
  2226. anonymous  users. If a FTP connection is left  idle  for  the
  2227. indicated amount of time it is automatically closed.  Filling
  2228. in  0  results in no time-out. Default values are 15  minutes
  2229. for anonymous and 10 hours for regular users.
  2230.  
  2231. The  next one deals with the way the program can be tried out
  2232. (when  there  is  no  registration  code).  æTryOutÆ  can  be
  2233. æCrippledÆ or æFullÆ. The first allows a user to do a maximum
  2234. of  5  GETs and 5 PUTs per session, switches the server  off-
  2235. line after 1 hour, and notifies clients that they are looking
  2236. at  an  unregistered try-out version. However,  it  does  not
  2237. contact my permission server. The æFullÆ option gives you  no
  2238. limitations while trying the program, it is exactly equal  to
  2239. the  registered version. The downside is that it does  access
  2240. my  permission server to ask for permission to run each  time
  2241. Serv-U  is  started. This is how the 30 days of  try-out  are
  2242. enforced.
  2243.  
  2244. All  the æLogXXXXÆ entries switch logging options on or  off.
  2245. Their names say it all, so IÆll let you figure them out.
  2246.  
  2247. The   æRegistrationKeyÆ  entry  is  used  for  entering   the
  2248. registration  code. You get this code after registration.  By
  2249. default it has no value and for evaluation of the program  it
  2250. should be left blank or out of the .INI file.
  2251.  
  2252. æAnonRelPathsÆ  determines  if  anonymous  users  should   be
  2253. treated with all path names relative to their home directory.
  2254. This  is  desirable for use with WWW browsers that insist  on
  2255. having access to the root directory (æ/Æ). Switching this  on
  2256. limits  anonymous  users  to  the  sub-tree  of  their   home
  2257. directory, they cannot switch to other drives. If you  switch
  2258. it  off then anonymous users will be treated like all others.
  2259. Default is switched on.
  2260.  
  2261. The  next  entry is æWindowÆ and this is set by Serv-U  every
  2262. time  the  program is stopped. It contains the last  position
  2263. and   size   of   the   program   window,   in   the   format
  2264. ætop,left,width,heightÆ. Likewise,  æUserInfoWinÆ  saves  the
  2265. window position of the user information window, in the format
  2266. ætop,leftÆ.
  2267.  
  2268. To  enable  directory change messages you  have  to  set  the
  2269. æDirChangeMesFileÆ entry to a valid file name. This can be  a
  2270. complete  path  name, in which case the  same  file  will  be
  2271. displayed  for  all path changes, or it can be  a  file  name
  2272. only, which means Serv-U will look for that file in the  path
  2273. the user is changing to.
  2274.  
  2275. If  links  should be available and displayed  in  the  userÆs
  2276. directory listings then æLinkFileÆ should be
  2277. set to the file name to use. The file name format is the same
  2278. as for æDirChangeMesFileÆ.
  2279.  
  2280. To  check if anonymous æpasswordsÆ resemble an E-mail address
  2281. you can set æCheckAnonPassÆ to YES, ON or TRUE. Likewise, you
  2282. can  switch checks off by setting it to FALSE, NO or OFF, and
  2283. this  is  also  the default. In that case Serv-U  will  allow
  2284. anything as an anonymous password.
  2285.  
  2286. Finally, æVersionÆ keeps track of the Serv-U version  number.
  2287. Format is æmajor,minor,revision,build no.Æ and it is used for
  2288. automatic .ini file conversion.
  2289.  
  2290. [SIGNONOFF]
  2291. This section contains the messages that are displayed after a
  2292. user  contacts the FTP server and just before he disconnects.
  2293. Every  line  has a separate entry with a number at  the  end,
  2294. denoting  the order. The sign-on message is put in æSignOnxxÆ
  2295. entries  (with xx the line number), and the sign-off  message
  2296. is put in æSignOffxxÆ.
  2297.  
  2298. There  are  several special character combinations recognized
  2299. by Serv-U and they are expanded to their actual values when a
  2300. user logs on or off. They all begin with æ%Æ and you can find
  2301. a  complete  list in the æHow to use sign-on and/or  sign-off
  2302. messagesÆ section.
  2303.  
  2304. A tip: Keep the number of lines and the their length limited.
  2305. Most  FTP clients will mess up lines over 80 characters,  and
  2306. since  a  FTP reply code is tagged to the beginning of  these
  2307. lines  before they are sent, it is wise to keep them to  less
  2308. then 75 characters.
  2309.  
  2310. [IP-ACCESS]
  2311. This  section  determines  which client  IP-numbers  will  be
  2312. allowed access to Serv-U. There are two kinds of rules: Those
  2313. that refuse access in the form of æBounceÆ entries, and those
  2314. that  grant  access using æAllowÆ entries.  If  this  section
  2315. doesnÆt exist, or no entries are found, then all clients  are
  2316. allowed  to contact the server. The reverse is also true,  if
  2317. there is even a single entry (æBounceÆ or æAllowÆ) then  only
  2318. those clients will be allowed to contact the server that pass
  2319. the  rule.  All entries are numbered sequentially  (æAllow1Æ,
  2320. æAllow2Æ  etc.)  and  they are evaluated according  to  their
  2321. number from first to last. Numbers should be consecutive. The
  2322. æBounceÆ rules are evaluated before the æAllowÆ rules.
  2323.  
  2324. The IP-number of the client is matched section by section  to
  2325. each rule until a match is found. If the matching rule is one
  2326. of  the æBounceÆ rules, the client is disconnected. If the IP
  2327. number matches an æAllowÆ rule then he can proceed. The rules
  2328. can be exact IP-numbers, or contain special characters. There
  2329. are two of those:
  2330.  
  2331.      *    = wildcard, match any number
  2332.      -    = denotes a range
  2333.  
  2334. A  quick example: The rule æ132.*.76.48-89Æ will allow  entry
  2335. to  clients with an IP-address starting with 132, the  second
  2336. section  can be anything (0..255), the third must be  76  and
  2337. the  last  section  should  be  between  48  and  89  (limits
  2338. included).
  2339.  
  2340. [USER=æNameÆ]
  2341. The  information  about  a user is stored  in  this  section,
  2342. æNameÆ  stands for the userÆs name. Each user has a  separate
  2343. section.  It  contains information needed to  authenticate  a
  2344. user  during login, and rules determining what this  user  is
  2345. allowed  to access. The Serv-U program will first check  this
  2346. section  for a regular user. If no applicable information  is
  2347. found  and  the  user is a member of a group,  the  group  is
  2348. addressed for the same information. If the result of this  is
  2349. still undetermined, the special user name æALLÆ is searched.
  2350.  
  2351. Now  to  the  entries that can be found in this section.  The
  2352. identity  of  a  user is verified by comparing his  password,
  2353. after  encryption, with the one in the æPasswordÆ entry.  The
  2354. UNIX  æcrypt()Æ command is used to encode the passwords. This
  2355. makes  it possible to extract users with their password  from
  2356. the  PASSWD file of a UNIX system, the same passwords  should
  2357. work  on  both systems. Unfortunately, there is not a  single
  2358. standard for password encryption on UNIX systems these  days.
  2359. Serv-U  uses the most common scheme, but this might not  work
  2360. for your system.
  2361.  
  2362. If  the  password matches, the home directory of the user  is
  2363. taken from the æHomeDirÆ entry. This should always be a  full
  2364. path name, including drive letter!
  2365.  
  2366. To make a user a member of a certain group, the æGroupÆ entry
  2367. can  be  used.  All information needed and not found  in  the
  2368. userÆs section; password, home dir and file/directory access,
  2369. are then  looked for in the groupÆs section.
  2370.  
  2371. Information  about file and directory access for  a  user  is
  2372. stored  in  the æAccessÆ entries. Each of these is  numbered,
  2373. and  access information is checked in order: first  comparing
  2374. it  to  the  first rule, then the second, etc. The  numbering
  2375. must  be consecutive. Access rules start with a path or  file
  2376. name.  These  paths are usually full names,  including  drive
  2377. letter.  If  the drive letter is missing, they apply  to  all
  2378. drives.  If different settings are needed for a subdirectory,
  2379. then  a  rule  with that directory should appear  before  its
  2380. parent,  i.e. with a lesser number (As a consequence  of  the
  2381. order in which Serv-U evaluates access rules). The path in an
  2382. access rule is followed by a comma and the access information
  2383. itself.  This  can be a combination of up to eight  different
  2384. characters:
  2385.  
  2386.      R    = read access to files
  2387.      W    = write access to files
  2388.      M    = modify access to files (implies write access)
  2389.      E    = execute access, for remotely starting programs
  2390.      C    = right to create subdirectories
  2391.      D    = right to delete subdirectories
  2392.      L    = directory list access
  2393.      P    = the rule æpropagatesÆ to sub directories as well
  2394.  
  2395. It  is entirely possible to have no access information at all
  2396. (only  a  path). This means that the user will not  have  any
  2397. access  to  that  path. One thing to realize  is  that  write
  2398. access  to a file does not imply read access! As you can  see
  2399. it is also possible to specify access rights for the parallel
  2400. and  serial  ports.  They are part of  the  regular  security
  2401. scheme  and to transfer to or from a port a user needs access
  2402. rights.  Then  finally, the path in an access rule  does  not
  2403. have  to point to a directory. It is also possible to specify
  2404. a filename. Of course, the æCÆ, æDÆ, æLÆ, and æPÆ rights will
  2405. not have any meaning then.
  2406.  
  2407. There  are two special user names: æAnonymousÆ and æALLÆ.  If
  2408. there is an user æAnonymousÆ, it will be possible to log into
  2409. the  server without a password. Instead, Serv-U will ask  for
  2410. the  userÆs E-mail address and log this. Most of the  regular
  2411. entries apply for æAnonymousÆ as well, except æPasswordÆ  and
  2412. æGroupÆ, these are ignored. In fact, for anonymous users  the
  2413. sections for groups and æALLÆ are never searched.
  2414.  
  2415. The user æALLÆ is searched if no appropriate rule is found in
  2416. a  userÆs or the userÆs groupÆs entry. It can contain any  of
  2417. the regular entries.
  2418.  
  2419. The  æLoginMesFileÆ  entry is used for pointing  to  a  login
  2420. message file that should be displayed to the user upon login.
  2421. The  same file name rules apply as for the æDirChangeMesFileÆ
  2422. entry,  and you can find more details about its usage in  the
  2423. æHow to setup user specific long messagesÆ section.
  2424.  
  2425. The  user  heading  can contain an added æ@Æ  followed  by  a
  2426. number,  like æ[USER=Anonymous1@1]Æ. This indicates that  the
  2427. user name is associated with a particular IP number for multi-
  2428. homed IP support. A list with IP numbers and their index  can
  2429. be found in the æ[IP-HOMES]Æ section.
  2430.  
  2431. [GROUP=æNameÆ]
  2432. These  sections contain the group info. The entries here  are
  2433. exactly the same as those for a user, except that the æGroupÆ
  2434. entry has no meaning of course.
  2435.  
  2436. [IP-HOMES]
  2437. This section lists all the IP numbers that Serv-U should  use
  2438. for multi-homed IP support. Each line couples an index number
  2439. with    a    corresponding   IP   number    of    the    form
  2440. æIPx=yyy.yyy.yyy.yyyÆ. In this æxÆ is the index  number  (any
  2441. positive  number between 1 and 30000), and æyyy. . .Æ is  the  IP
  2442. number that should be associated with it.
  2443.  
  2444. When  a user name should be coupled to a particular IP  home,
  2445. the  index  number for that IP home is appended to  the  user
  2446. name, preceded by a æ@Æ character.
  2447.  
  2448. [EXTERNAL]
  2449. This  heading denotes a list of dynamic link libraries  which
  2450. Serv-U  should  use to very user access. In case  the  Serv-U
  2451. user  database does not provide an answer to access  requests
  2452. the  inquiry  is passed on to the first DLL in the  list,  if
  2453. this  DLL  does not have an answer it is send to  the  second
  2454. DLL, and so on.
  2455.  
  2456. Each   line  in  this  section  has  entries  of   the   form
  2457. æClientCheckDLLÆ. These are followed by an order  number  and
  2458. specify the file name of the DLL to use. The DLL file  should
  2459. be  either in the Serv-U program directory, somewhere in  the
  2460. DOS path, or in the Windows directory for Serv-U to find it.
  2461.  
  2462. 3.3 Using External User Access Verification DLLs
  2463. ------------------------------------------------
  2464.  
  2465. Serv-U  can  use an external DLL to verify client access  and
  2466. retrieve information like a client's home directory  etc.  If
  2467. one  of  more  external DLLs are specified and Serv-U  cannot
  2468. find  the appropriate information internally it will question
  2469. each  of  the  external DLL's in turn. This can  be  used  to
  2470. create  an  interface to external user databases,  which  can
  2471. then  control FTP access. If the appropriate DLL exists,  for
  2472. example  the NT build-in user database could be  used,  or  a
  2473. Novell user database.
  2474.  
  2475. Setup
  2476. -----
  2477. To   make   Serv-U  use  external  DLLs  for  client   access
  2478. verification you need to add the DLL names to the  SERV-U.INI
  2479. file. At the moment there is no interactive user setup to  do
  2480. this, so the ini file has to be edited directly. There can be
  2481. more  than  one DLL, and Serv-U will query them in the  order
  2482. specified  until  one of the DLLs signals  that  it  had  the
  2483. required information.
  2484.  
  2485. The   DLL  names  need  to  be  added  to  a  section   named
  2486. '[EXTERNAL]'. The format is as follows (for example):
  2487.  
  2488.      [EXTERNAL]
  2489.      ClientCheckDLL1=CHKNOVELL.DLL
  2490.      ClientCheckDLL2=CHKNT.DLL
  2491.             .
  2492.             .
  2493.  
  2494. The  file names can be either full path names, or file  names
  2495. only.  If  the full path is specified then Serv-U  will  only
  2496. look at that path. If only the file name is given Serv-U will
  2497. first  look  in  the  program  directory,  then  the  current
  2498. directory,  the  entire  PATH, and  finally  in  the  Windows
  2499. directories.
  2500.  
  2501. DLL Specifications
  2502. ------------------
  2503. The  DLL  entry  point for Serv-U needs to be  the  following
  2504. function:
  2505.  
  2506.      int HandleClientEvent(RClientEventStr* pEventStruc)
  2507.  
  2508. Please note that the function name is case sensitive!
  2509. The  function should return TRUE (=1) if it handled the event
  2510. and  does  not  want it to be passed on to the next  DLL.  It
  2511. should return FALSE (=0) in case it didn't handle the event.
  2512.  
  2513. The RClientEventStr structure is defined as follows:
  2514.  
  2515.      struct RClientEventStr {
  2516.        int Event;        // event code
  2517.        int  Flag;        // flag, meaning depends  on event
  2518.        char User[40];    // user name
  2519.        char  Aux[512];   //  auxiliary  area,  usage depends on event
  2520.        char HostIP[16];  // server IP home
  2521.      }
  2522.  
  2523. The 'Event' code determines the nature of the request and can
  2524. have the following values:
  2525.  
  2526.      #define SRVU_LoginMesFile    1    // get login message file
  2527.      #define SRVU_HomeDir         2    // get home dir
  2528.      #define SRVU_Password        3    // verify password
  2529.      #define SRVU_IPAccess        4    // verify IP access
  2530.      #define SRVU_WriteFile       5    // verify write access
  2531.      #define SRVU_ReadFile        6    // verify read access
  2532.      #define SRVU_ModifyFile      7    // verify mod./del. file access
  2533.      #define SRVU_ExecProg        8    //  verify  execute access
  2534.      #define SRVU_ListDir         9    // verify dir listing access
  2535.      #define SRVU_ChangeDir       10   // verify dir change access
  2536.      #define SRVU_DeleteDir       11   // verify dir delete access
  2537.      #define SRVU_CreateDir       12   // verify dir create access
  2538.  
  2539.  
  2540. Event Details
  2541. -------------
  2542. SRVU_LoginMesFile
  2543.        On entry:    User = user name
  2544.        On return:   Flag = TRUE (=1) if file name was found,
  2545.                            FALSE (=0) otherwise
  2546.                      Aux = file name of login message file, if one  was
  2547.                            found
  2548.  
  2549. SRVU_HomeDir
  2550.        On entry:    User = user name
  2551.        On return:   Flag = TRUE if home dir was found, FALSE
  2552.                            otherwise
  2553.                      Aux = home dir (full path), if one was found
  2554.  
  2555.        Note:        In case a user account is disabled 'no  home
  2556.                     dir' should be returned.
  2557.  
  2558. SRVU_Password
  2559.        On entry:    User = user name
  2560.                      Aux = password the user entered
  2561.        On  return:  Flag = TRUE if password  was  correct,
  2562.                            FALSE otherwise
  2563.  
  2564. SRVU_IPAccess
  2565.        On entry:    User = user name if available
  2566.                      Aux = IP address of client, in text format
  2567.        On  return:  Flag = TRUE if access is allowed, FALSE
  2568.                            otherwise
  2569.  
  2570.        Note: If no user name is present it means the client
  2571.              just connected and a check should be made  for  server-
  2572.              wide IP access. If a user name is present access should  be
  2573.              checked for that particular user only.
  2574.  
  2575. SRVU_WriteFile
  2576.        On entry:    User = user name
  2577.                      Aux = full path of file
  2578.        On return:   Flag = TRUE if access is allowed, FALSE
  2579.                            otherwise
  2580.  
  2581. SRVU_ReadFile
  2582.        On entry:    User = user name
  2583.                     Aux  = full path of file
  2584.        On  return:  Flag = TRUE if access is allowed, FALSE
  2585.                            otherwise
  2586.  
  2587. SRVU_ModifyFile
  2588.        On entry:    User = user name
  2589.                      Aux = full path of file
  2590.        On  return:  Flag = TRUE if access is allowed, FALSE
  2591.                            otherwise
  2592.  
  2593. SRVU_ExecProg
  2594.        On entry:    User = user name
  2595.                      Aux = full path of program name to be executed
  2596.        On  return:  Flag = TRUE if access is allowed, FALSE
  2597.                            otherwise
  2598.  
  2599. SRVU_ListDir
  2600.        On entry:    User = user name
  2601.                      Aux = full path of directory
  2602.        On  return:  Flag = TRUE if access is allowed, FALSE
  2603.                            otherwise
  2604.  
  2605. SRVU_ChangeDir
  2606.        On entry:    User = user name
  2607.                      Aux = full path of directory
  2608.        On  return:  Flag = TRUE if access is allowed, FALSE
  2609.                            otherwise
  2610.  
  2611. SRVU_DeleteDir
  2612.        On entry:    User = user name
  2613.                      Aux = full path of directory
  2614.        On  return:  Flag = TRUE if access is allowed, FALSE
  2615.                            otherwise
  2616.  
  2617. SRVU_CreateDir
  2618.        On entry:    User = user name
  2619.                      Aux = full path of directory
  2620.        On  return:  Flag = TRUE if access is allowed, FALSE
  2621.                            otherwise
  2622.  
  2623.  
  2624. 4. Getting In Touch - Bugs & Registration
  2625. =========================================
  2626.  
  2627. If  you  have questions or want to offer suggestions you  are
  2628. most  welcome  to drop me a line. However, please  check  out
  2629. this  manual and the Cat Soft Web site first to  see  if  the
  2630. answer to your question is already in there. Although I truly
  2631. love  to  hear  from  you and will do my best  to  help,  the
  2632. problem  is  that each day between 30 and 50 E-mail  messages
  2633. arrive  here,  and  you are talking to a one-man,  spare-time
  2634. company!  As it is IÆm spending  2-3 hours a day on answering
  2635. E-mail  and  that is about as much as I have  to  spare.  The
  2636. easiest  way  to  get  in touch with me is  via  E-mail.  The
  2637. address is:
  2638.  
  2639.      RB5@acpub.duke.edu
  2640.  
  2641. The Cat Soft Web site can be found at:
  2642.  
  2643.      http://www.cat-soft.com
  2644.  
  2645. Regular  mail  should  work as well, but  might  take  a  bit
  2646. longer. My address for this is:
  2647.  
  2648.      Rob Beckers
  2649.      210 Alexander Ave., Apt. D
  2650.      Durham, NC 27705
  2651.      USA
  2652.  
  2653.  
  2654. 4.1 Serv-U Mailing List and Conference
  2655. --------------------------------------
  2656.  
  2657. There is also a WWW conference for Serv-U, and a mailing list
  2658. where  you  can  ask  questions and  discuss  Serv-U  related
  2659. topics. To subscribe to the Serv-U mailing list, send  an  E-
  2660. mail message to:
  2661.  
  2662.      list@corridor.com
  2663.  
  2664. with  only  a  single line in the message body, which  should
  2665. read:
  2666.  
  2667.      subscribe Serv-U
  2668.  
  2669. This  will  return a message from the list manager  within  a
  2670. minute  or  so, explaining in detail how to post messages  to
  2671. the  list and related matters. I am also subscribed  to  this
  2672. list,  so each message you post will reach my E-mail  box  as
  2673. well.  When needed IÆll respond to your message, but my  hope
  2674. is  that others will reply to, thus cutting down a bit on the
  2675. flood of messages I have to answer each day.
  2676.  
  2677. For the WWW based Serv-U conference, take a look at:
  2678.  
  2679.      http://www.spring.com/yapp-bin/public/read/apps/58
  2680.  
  2681. 4.2 Reporting Bugs
  2682. ------------------
  2683.  
  2684. Nothing  in  this world is perfect, least of  all  me!  Alas,
  2685. chances are that despite careful testing youÆll still find  a
  2686. bug.  Please donÆt think others will report it, let me  know!
  2687. There  are  a few things I need to know in order  to  improve
  2688. chances of fixing the beastie, so take note of the following:
  2689.  
  2690.    ╖ Most  important: Can you get the same bug  to  appear  by
  2691.      repeating  certain actions? Please try hard;  without  a
  2692.      recipe  for repeating a bug, itÆs going to be very  hard
  2693.      to track it down.
  2694.    ╖ What  TCP/IP  and WinSock stack are you using? Brand/type
  2695.      and  version  number please. What operating system  (DOS
  2696.      version  and Windows or Windows-For-Workgroups,  Windows
  2697.      95,  NT  version x.xx)? Any memory manager (QEMM  etc.),
  2698.      what version?
  2699.    ╖ Please  indicate also if this bug is merely  cosmetic  or
  2700.      of  vital  importance  for using  Serv-U.  Somewhere  in
  2701.      between  is  possible as well of course. By the  way,  I
  2702.      consider security related bugs very important!
  2703.    ╖ Finally,  please give me a chance to fix  a  bug,  before
  2704.      you  start to shout all over the Internet how  bad  this
  2705.      program is . . .
  2706.      
  2707. 4.3 Registering Serv-U
  2708. ----------------------
  2709.  
  2710. If  youÆre happy with the performance of Serv-U, then  please
  2711. make me happy and register this program! Just a few words for
  2712. those  who  are in doubt: Making this program took  me  (very
  2713. literally)  months  of work, spread out  over  the  last  two
  2714. years.  Your  registration fee is going  to  motivate  me  to
  2715. continue  improving  Serv-U.  In  general,  registration   is
  2716. important  for shareware programs: It makes it  possible  for
  2717. you to use professional quality software for peanuts. Lastly,
  2718. being  a  biomedical engineering graduate  student,  IÆm  not
  2719. exactly making lots of $$Æs (to put it mildly). So, those  25
  2720. bucks for registration mean a lot to me!
  2721.  
  2722. What  do  you  get if you register? As soon  as  I  get  your
  2723. registration   IÆll  send  you  a  registration   code   plus
  2724. instructions  on  how  to add it to the  program.  This  will
  2725. enable  you  to  use  the program after the  30  day  try-out
  2726. period. Please let me know your E-mail address, since  Serv-U
  2727. is  tailored to pick the registration key out of  the  E-mail
  2728. message  I will send you. In case I have your E-mail  address
  2729. youÆll  also  get  notified  when  there  are  updates.  Once
  2730. registered  youÆll get those updates for free. That  is,  you
  2731. can use the same registration code on the updates, but youÆll
  2732. have  to  get them yourself. Apart from all this youÆll  also
  2733. get the nice, warm feeling of having contributed to improving
  2734. my earthly wealth!
  2735.  
  2736. The  registration code is tied to the user/company  name  you
  2737. specify on the registration form. You can see if your  server
  2738. is  registered  by  looking  at  the  æAboutÆ  dialogbox:  If
  2739. registered it will tell you to whom. Another thing to keep in
  2740. mind is that the registration information is sent back to any
  2741. FTP  client who uses the FTP command æHELPÆ. This  is  not  a
  2742. much  used command but in principle it allows the whole world
  2743. to  find out who paid for your copy of Serv-U. If youÆre  the
  2744. lawful  owner  of  the  server  this shouldnÆt bother you, if
  2745. not. . .
  2746.  
  2747. The  registration fee is $25 for each copy. If  you  want  to
  2748. make  me  even happier and need several copies, the following
  2749. license prices apply:
  2750.  
  2751.      The FTP Serv-U license prices:
  2752.      
  2753.      1-9  $25 per copy
  2754.      
  2755.      License for:
  2756.      20   $250
  2757.      50   $500
  2758.      100  $700
  2759.      100+ $500 per block of 100 copies
  2760.      
  2761.      Licenses for more than 500 copies are negotiable.
  2762.      Educational discount: For licenses of 50 or more copies:
  2763.      30% discount.
  2764.  
  2765. The  ænumber of copiesÆ in the above refers to the number  of
  2766. concurrently  running Serv-U FTP servers in your organization
  2767. (i.e.  it  is  independent of the number  of  concurrent  FTP
  2768. clients).  The  last page of this manual is the  registration
  2769. form. Please use this form for all registrations! That way  I
  2770. can keep my administration manageable.
  2771.  
  2772. 4.4 Registration in the US
  2773. --------------------------
  2774.  
  2775. To   register  from  within  the  US,  please  fill  out  the
  2776. registration  form  and send it along  with  payment  to  the
  2777. address  on  the  form. A (personal) check made  out  to  Rob
  2778. Beckers is the preferred form of payment, but a Postal  Money
  2779. Order,  or  Purchase  Order is welcome too.  If  you  need  a
  2780. receipt,  then  please mention this on the registration  form
  2781. and I will send you one by paper mail. It is also possible to
  2782. register via CompuServe's SWREG service. The registration  ID
  2783. for  that  is  7743 and this costs $30 (Since CS  takes  $5).
  2784. Sorry,  but  I  cannot accept credit cards  at  this  moment.
  2785. However,  I  am working on this and hope to be able  to  take
  2786. credit  cards  soon. Drop me a line for the  latest  info  on
  2787. this.
  2788.  
  2789.                        Important Note:
  2790.                        ===============
  2791. Make sure to include the registration form with whatever you
  2792.   send me!! IÆm receiving way too many checks and purchase
  2793. orders without a form, often even without a name nor a phone
  2794.  number. If your order goes through a purchasing department
  2795. then please make sure they include the registration form with
  2796.                       the PO or check!
  2797.  
  2798.  
  2799. 4.5 Registration from Abroad
  2800. ----------------------------
  2801.  
  2802. While  borders are disappearing in many parts of  the  world,
  2803. getting  money across from one  country to another  is  still
  2804. not  easy, at least not when you want to keep the cost  down.
  2805. Below is a list of payment options that I accept (in order of
  2806. preference).  Please  make sure to include  the  registration
  2807. form  with anything you send me. Sorry, but no credit  cards!
  2808. Instead, these are the payment options:
  2809.  
  2810.      ╖ Using CompuServe's SWREG service. The registration ID
  2811.        for Serv-U is 7743 and registration costs $30 this way (CS
  2812.        takes $5, so I end up with $25).
  2813.      ╖ By check, drawn at an American bank and in US dollars.
  2814.        The check should be made out to Rob Beckers.
  2815.      ╖ By American Express Travelers Checks for the correct
  2816.        amount in US dollars. These are cheap and safe, but there
  2817.        might be a minimum commission charged by your bank. The
  2818.        checks should be made out to Rob Beckers and don't forget to
  2819.        sign them twice!
  2820.      ╖ By Postal Money Order. As I understand it, you can buy
  2821.        these international money orders in most countries for very
  2822.        little money ($3 here in the US). Payment is in your own
  2823.        currency, but the money order should be made out for US $25
  2824.        and to Rob Beckers.
  2825.      ╖ By cash, but only in US dollars and I give no guarantees
  2826.        about safe arrival! Please do not send me other currencies,
  2827.        it would probably cost me much more to convert them to US
  2828.        dollars than it will cost you. A trick I found useful for
  2829.        sending cash in envelopes: put the money in a folded sheet of
  2830.        paper so it doesn't shine through the envelope. This might
  2831.        improves chances of arrival considerably.
  2832.      ╖ For Europeans: It is possible to pay using a Euro-
  2833.        Cheque. Make the check out for 40 Dutch guilders, i.e. write
  2834.        "DFL 40" for the currency. Don't forget to add the security
  2835.        number at the back. Send it to: Rob Beckers; St. Agnesstraat
  2836.        16; 6241CB Bunde; The Netherlands. Please send or E-mail the
  2837.        registration form to me in the US.
  2838.      ╖ For the Dutch: Het is ook mogelijk te betalen door fl.
  2839.        40 over te maken op girorekening 53.95.461 t.n.v. Rob Beckers
  2840.        te Bunde. Stuur dan wel even het registratie formulier per E-
  2841.        mail naar mij toe. S.v.p. geen geld vanuit Belgie of
  2842.        Duitsland rechtstreeks overmaken, want daarvan blijft
  2843.        niet veel over!
  2844.      ╖ For Canadians only: By any type of (personal) bank check
  2845.        of Canada. Just make the check out in US dollars. Doing so is
  2846.        easy: Write "US" in front of the dollar sign and add "US
  2847.        Funds" below the sum. This way neither of us pays anything
  2848.        extra (I don't, and as far as I know you don't either, but
  2849.        check with your bank if you want to make sure). The check
  2850.        should be made out to Rob Beckers.
  2851.      ╖ By direct money transfer in US dollars to my American
  2852.        bank account. Please add $13 extra, since that is the fee my
  2853.        bank charges me to receive money this way. Please send me the
  2854.        registration form by E-mail in this case. The details for a
  2855.        wire transfer are:
  2856.  
  2857.           Bank:
  2858.                Wachovia
  2859.                Durham - North Carolina
  2860.           ABA/Routing no:
  2861.                053100494
  2862.           Account:
  2863.                No. 2373193064
  2864.                Rob Beckers
  2865.                210 Alexander Ave., Apt. D
  2866.                Durham, NC 27705
  2867.                USA
  2868.  
  2869.  
  2870.  
  2871. ******************** REGISTRATION FORM **********************
  2872.  
  2873. ROB BECKERS
  2874. 210 Alexander Ave., Apt. D
  2875. Durham, NC 27705
  2876. U.S.A.
  2877.  
  2878.                               
  2879.                               
  2880.                      REGISTRATION FORM SERV-U
  2881.                      ========================
  2882.  
  2883.  
  2884.            Name: ............................................
  2885.  
  2886.    Company Name: ............................................
  2887.  
  2888.         Address: ............................................
  2889.  
  2890.                  ............................................
  2891.  
  2892.                  ............................................
  2893.  
  2894.    Phone Number: ............................................
  2895.  
  2896.  E-Mail Address: ............................................
  2897.                   (Important! Reg. Code is sent by E-mail)
  2898.   No. of copies: .........
  2899.  
  2900. Additional comments, suggestions, complaints, praise, etc .
  2901.  
  2902. .............................................................
  2903.  
  2904. .............................................................
  2905.  
  2906. .............................................................
  2907.  
  2908. Registration fee is $25 per copy. Send this order form  along
  2909. with your payment to: Rob Beckers, 210 Alexander Ave. Apt. D,
  2910. Durham NC 27705, USA.
  2911.  
  2912. If   you  have any questions, comments or suggestions  please
  2913. contact  Rob  Beckers at the above address or via  e-mail  to
  2914. RB5@acpub.duke.edu. Check out the site license prices in  the
  2915. manual if you need multiple copies.
  2916.  
  2917. As  this software is shareware it comes `as is', there is  no
  2918. warranty  implied  or  otherwise, nor  is  support  provided.
  2919. However, if you discover any bugs or problems please  contact
  2920. the developer at the above e-mail address.
  2921.